[QUOTE=KmartSqrl;41885309]Download cake or laravel and spend a couple hours doing a getting started tutorial for one of them. It'll be a good learning experience even if you decide to make your own still. You might get some ideas for what you're building as well.[/QUOTE]
Will do, thanks for the tip.
[editline]19th August 2013[/editline]
[QUOTE=StinkyJoe;41889551]No modern PHP developer will use a third-party library/package/framework that is not composer-ready, I can assure you of that.
You don't want to "complicate" your library with composer, but the alternative is forcing developers using your library to jump through some pretty shitty hoops:
- Your library's files have to be included directly in the codebase (a-la last decade's lib or includes directories, yuck!), or hidden away in git submodules. (composer handles this for you)
- Custom autoloading mechanics have to be included just to use your library. (composer handles this for you, with the generated autoload.php file).
- Developers using your library have to manage your package's versioning manually (composer allows you to define version constraints in your composer.json, and install or update packages with a single command).
This is an opportunity for you to learn something useful for you, as a guy working with PHP. You can try to dodge the matter as much as you want, and choose not to package your library with composer, but it will be the wrong choice.
The documentation is piss easy to follow for all skill levels, and there are additional tutorials around if you need something more hand-holdy - no excuses: [URL]http://getcomposer.org/doc/[/URL][/QUOTE]
I'm not aiming to completely oust usage of Composer, i'll definitely include Composer support - but still have support for those who don't want to use Composer.
[QUOTE=Giraffen93;41883112][url]https://dl.dropboxusercontent.com/u/1963496/Facepunch_Profile_Ratings_CLIENT.user.js[/url]
first version[/QUOTE]
Would you post a CRX version of it, I'm having trouble figuring out why I can't get it to work for me, because I'm on a chromebook.
[QUOTE=Dorkslayz;41889607]I'm not aiming to completely oust usage of Composer, i'll definitely include Composer support - but still have support for those who don't want to use Composer.[/QUOTE]
That goes without saying, really - making your code ready for use with composer pretty much consists of including a composer.json file, and describing how your library should be autoloaded.
Good luck.
hey dudes. im a scrub at coding but i made this [url]http://txt.elexar.com/[/url] which i think is my greatest achievement ever, but i need a way to keep the background music running throughout page browsing if you know what i mean. does anyone have any idea?!
Finally finished my silent word processor micro site. [url]http://bsilent.graymic.co.uk[/url] It's broken to some extent so "finished" is probably a bad word, should be a laugh though to try and get it completed. Having trouble with Silent K's and CH's at the moment. Trying to map Germanic / Greek based phonetics.
[QUOTE=Elexar;41889741]hey dudes. im a scrub at coding but i made this [url]http://txt.elexar.com/[/url] which i think is my greatest achievement ever, but i need a way to keep the background music running throughout page browsing if you know what i mean. does anyone have any idea?![/QUOTE]
My suggestion is to remove the background music you basterd.
[QUOTE=James xX;41889670]Would you post a CRX version of it, I'm having trouble figuring out why I can't get it to work for me, because I'm on a chromebook.[/QUOTE]
I don't use chrome, don't know how to make a crx.
Userscripts work natively with chrome though
[QUOTE=Elexar;41889741]hey dudes. im a scrub at coding but i made this [url]http://txt.elexar.com/[/url] which i think is my greatest achievement ever, but i need a way to keep the background music running throughout page browsing if you know what i mean. does anyone have any idea?![/QUOTE]
Use [URL="https://github.com/rails/turbolinks/"]Turbolinks[/URL] and make the audio play via JavaScript.
[QUOTE=KmartSqrl;41887256]Finally set up data backups for spoonfedstyle.com today. I was bad/lazy and didn't do it for quite a while but I got everything working really fast today thanks to the 'backup' gem ([url]https://github.com/meskyanichi/backup[/url])
Redis and postgres data both get exported and gzipped and then it gets uploaded to s3 for safe keeping at midnight every night.
[editline]18th August 2013[/editline]
I like it so far, assuming it's not done since the search doesn't do anything. Are you planing on making the search happen automatically in that side area like google does now? I think I would if it were my project. Would be cool if you could link directly to images and have them show as a thumbnail or have media like videos/music (links directly to files like mp3s and youtube/soundcloud/whatever) embedded so you don't have to actually open the links to engage with everything in a list. You'd need to find a good way to give links directly to pages enough emphasis that the videos/thumbs/etc don't drown them out though.[/QUOTE]
Thanks for the feedback :) Yeah the search doesn't work on the homepage yet, but it works on the user dashboard thing once you're logged in so it's just a matter of copying over that code to the homepage, and yeah the stuff appears automatically like on google. Showing link content inline is a great idea, I previously thought that in the next version of the site I'd have the content open in a kind of frame, like stumbleupon does, but inline content would work better I think.
[QUOTE=Giraffen93;41883112][url]https://dl.dropboxusercontent.com/u/1963496/Facepunch_Profile_Ratings_CLIENT.user.js[/url]
first version[/QUOTE]
From when did it collect data? I have like 3 dumbs etc. Does it update?
[editline]19th August 2013[/editline]
Alcapwne, will you come on Steam today?
[QUOTE=SweFox*;41890155]From when did it collect data? I have like 3 dumbs etc. Does it update?
[editline]19th August 2013[/editline]
Alcapwne, will you come on Steam today?[/QUOTE]
i made a post here not long ago, can't remember
can't be more than a couple of weeks
it updates as i browse at home, swedish free time hours
[QUOTE=Giraffen93;41890370]i made a post here not long ago, can't remember
can't be more than a couple of weeks
it updates as i browse at home, swedish free time hours[/QUOTE]
No I mean from when did it start to collect data? Where does it get the ratings from? Why do I have so few?
[QUOTE=SweFox*;41890461]No I mean from when did it start to collect data? Where does it get the ratings from? Why do I have so few?[/QUOTE]
As said, it started when i made that post.
It collects all the ratings from the pages i visit. You can see more stats in my title.
Thread info: [url]https://braxnet.org/fpr/thread.php?threadid=1249999[/url]
[QUOTE=Giraffen93;41890500]As said, it started when i made that post.
It collects all the ratings from the pages i visit. You can see more stats in my title.
Thread info: [url]https://braxnet.org/fpr/thread.php?threadid=1249999[/url][/QUOTE]
Oh, that's an interesting solution.
[QUOTE=SweFox*;41890513]Oh, that's an interesting solution.[/QUOTE]
I want to release the collector script but it's so easy to exploit it, so closed circle.
[QUOTE=SweFox*;41890155]
[editline]19th August 2013[/editline]
Alcapwne, will you come on Steam today?[/QUOTE]
Ah hey, yeah I'll just log on :)
snip
[editline]19th August 2013[/editline]
[QUOTE=Giraffen93;41890530]I want to release the collector script but it's so easy to exploit it, so closed circle.[/QUOTE]
I can help you secure it if you want
[QUOTE=Mega1mpact;41891054]snip
[editline]19th August 2013[/editline]
I can help you secure it if you want[/QUOTE]
how? it's sent from the client, you can't really protect it
[QUOTE=Giraffen93;41891133]how? it's sent from the client, you can't really protect it[/QUOTE]
Well something isn't secure if it's easy to exploit
[QUOTE=Mega1mpact;41891145]Well something isn't secure if it's easy to exploit[/QUOTE]
obviously, but how are you supposed to fix it? if you can read the clientside script you can always circumvent it
[QUOTE=Giraffen93;41891174]obviously, but how are you supposed to fix it? if you can read the clientside script you can always circumvent it[/QUOTE]
hmm true...
[QUOTE=Mega1mpact;41891351]hmm true...[/QUOTE]
if only there were proprietary userscripts :v:
i trust nobody
After browsing 4chan for quite some time already I always found downloading the pictures particularly annoying if I wanted to look at them again later on, so I went and made an extension for chrome called ImageVault which does exactly that. It uses Imgur for the hosting.
[url]https://chrome.google.com/webstore/detail/imagevault/bomjlepfmifajjfllfojeliikpgigngi[/url]
It's literally just a rehost app with a way to save them a bit more easily. Probably not that useful, but I know I will use it. (Am open for any suggestions if you have some. The dashboard design is still a bit off pixel wise, so I will work on that asap.)
(Also, Swefox, you didn't answer my pm!)
[QUOTE=Giraffen93;41891413]if only there were proprietary userscripts :v:
i trust nobody[/QUOTE]
You secure it by requiring multiple sources from a postid to have the same ratings
[QUOTE=Map in a box;41891788]You secure it by requiring multiple sources from a postid to have the same ratings[/QUOTE]
too much computations, would never be bothered
Am stuck and have no fucking clue what I'm doing. I'm tired. I'll prolly end up with $value69.
Oh, and why the fuck do I start each fucking comment with "Function to..."?
[CODE]
<?php
// FastDL Synchronization Functions
// Checking POST inputs
function checkVars () {
if (isset($_POST['srv_ip'], $_POST['srv_user'], $_POST['srv_pass'], $_POST['ws_ip'], $_POST['ws_user'], $_POST['ws_pass'])) {
return true;
}
else {
displayBlock();
}
}
// Function to display index site.
function displayBlock() {
echo "Index Site!";
}
// Function to connect to FTP server
function ftpConnect($ip, $user, $pass, $port) {
$ip = 'ftp.' . $ip;
if ($connection = ftp_connect($ip, $port)) {
if ($auth = ftp_login($connection, $user, $pass)) {
ftp_pasv($connection, true);
return $connection;
}
else {
return false;
}
}
else {
return false;
}
}
// Synchronize folder, files and structure.
function ftp_sync ($dir, $conn_id) {
if ($dir != ".") {
if (ftp_chdir($conn_id, $dir) == false) {
echo ("Change Dir Failed: $dir<BR>\r\n");
return;
}
if (!(is_dir($dir)))
mkdir($dir);
chdir ($dir);
}
$contents = ftp_nlist($conn_id, ".");
foreach ($contents as $file) {
if ($file == '.' || $file == '..')
continue;
if (@ftp_chdir($conn_id, $file)) {
ftp_chdir ($conn_id, "..");
ftp_sync ($file);
}
else
ftp_get($conn_id, $file, $file, FTP_BINARY);
}
ftp_chdir ($conn_id, "..");
chdir ("..");
}
// Function to check if current object is a directory or file
function checkType($string) {
$value = strstr($string, ".");
if(!$value) {
return true;
}
else {
return false;
}
}
// Function to download all files for compression
function downloadAddons($conn) {
$lua_dump = "";
$array = ftp_nlist($conn, '.');
foreach ($array as $value) {
if ($value == "./addons") {
ftp_chdir($conn, "addons");
$array2 = ftp_nlist($conn, '.');
foreach ($array2 as &$value2) {
$value2 = substr($value2, 2);
$exists = strstr($value2, ".");
if ($exists == ".gma") {
// Dumping Workshop ID to string
$pre_dump = str_replace(".gma", "", $value2);
$lua_dump .= 'resource.AddWorkshop("'.$pre_dump.'")' . "\n\r";
}
else {
ftp_chdir($conn, $value2);
$array3 = ftp_nlist($conn, ".");
foreach ($array3 as &$value3) {
$value3 = substr($value3, 2);
if($value3 == "materials" || "models" || "sound" || "maps" || "resource" || "particles") {
ftp_sync($value3, $conn);
}
}
}
}
echo $lua_dump;
}
}
}
?>
[/CODE]
[QUOTE=Giraffen93;41891824]too much computations, would never be bothered[/QUOTE]
Why not just release a spider or something to collect the ratings?
[QUOTE=Darkwater124;41892042]Why not just release a spider or something to collect the ratings?[/QUOTE]
Seriously. Just throw a shitscript up on heroku or something and git 'er done.
[QUOTE=Svenskunganka;41891929]Am stuck and have no fucking clue what I'm doing. I'm tired. I'll prolly end up with $value69.
Oh, and why the fuck do I start each fucking comment with "Function to..."?[/QUOTE]
Why are you even writing most of those comments? If your function name doesn't say what the function does you should be naming your functions better, not writing comments above them. Comments should be used to explain why something is done a certain way or what kinds of values a function expects and returns, not to duplicate information that's already contained in the code itself. Anyone reading your code should be able to know that "function ftpConnect($ip, $user, $pass, $port)" is a function to connect to FTP.
[QUOTE=Map in a box;41891788]You secure it by requiring multiple sources from a postid to have the same ratings[/QUOTE]
I thought about the same thing, but what happens when a new rating's added between two scrapes?
Sorry, you need to Log In to post a reply to this thread.