This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
class DomainVariable { | |
private $domain; | |
function __construct($domain = null) { | |
if($domain == null) { | |
$this->domain = DomainVariable::get_domain(); | |
} else { | |
$this->domain $domain; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DomainVariable { | |
private $domain; | |
function __construct($domain = null) { | |
if($domain == null) { | |
$this->domain = DomainVariable::get_domain(); | |
} else { | |
$this->domain $domain; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ID=1 | |
for i in {1..10000} | |
do | |
NUM=$(( ( RANDOM % 10 ) + 1 )); | |
LOAD=$(cut -d ' ' -f 1 < /proc/loadavg) | |
curl -H "Content-Type: application/json" -X POST -d "{\"id\": $ID, \"data_sequence\" : { \"data\":\"12839083,$LOAD\"} }" http://localhost:3000/api/v1/data_sequences | |
sleep 0.5 | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? [15/18] | |
class MailDomainGrabber { | |
private $email; | |
private $excludes = array( | |
"yahoo.com.au", | |
"yahoo.com", | |
"yahoo.co.uk", | |
"tpg.com.au", | |
"telstra.com", | |
"sa.gov.au", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
class CUAJobSegmenter { | |
private $jobs; | |
function __construct($jobs) { | |
$this->jobs = $jobs; | |
} | |
function get_segments_of($number) { | |
$segment_array = array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 BasicGame.ServerHandler = function(game, player) { | |
2 this.players = {}; | |
3 this.entities = []; | |
4 this.uuid = ""; | |
5 this.player = player; | |
6 this.game = game; | |
7 self = this; | |
8 } | |
9 | |
10 BasicGame.ServerHandler.prototype = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 BasicGame.ServerHandler = function(game, player) { | |
2 this.players = {}; | |
3 this.entities = []; | |
4 this.uuid = ""; | |
5 this.player = player; | |
6 this.game = game; | |
7 self = this; | |
8 } | |
9 | |
10 BasicGame.ServerHandler.prototype = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module GoTipping | |
class DomainGenerator | |
def initialize(name, domain, potential_conflicts = Setting.all, finder = SettingsFinderQuery.new) | |
@name = name | |
@domain = domain | |
@potential_conflicts = potential_conflicts | |
@finder = finder | |
end | |
def generate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module GoTipping | |
class UserAuthenticator | |
def initialize(username, organisation) | |
@user = organisation.users.find_by(username: username) | |
end | |
def authenticate(password) | |
return false unless @user | |
if BCrypt::Password.new(@user.password_digest) == password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.2.0 | |
RUN apt-get update -qq && apt-get install -y build-essential | |
RUN apt-get install -y nodejs | |
RUN apt-get install -y libmysqld-dev | |
ENV APP_HOME /app | |
RUN mkdir $APP_HOME | |
WORKDIR $APP_HOME |