This file contains 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
prototype: | |
api: &api | |
stack: node # remove this line | |
test: | |
npm run-script test-local | |
daemon: node frozenyak/bin/www | |
run: | |
./custom.sh | |
npm install -g grunt-cli && grunt | |
env: &env |
This file contains 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
bash %{ | |
sudo apt-get install nodejs | |
sudo apt-get install npm | |
sudo ln -s /usr/bin/nodejs /usr/bin/node #adds a symbolic link because most apps use node instead of nodejs | |
echo "Installed nodeJS: " | |
node -v | |
echo "Installed npm: " | |
npm -v | |
This file contains 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
public function getGeotargetingPopulationData($requestBody) | |
{ | |
return parent::processMessage( | |
function () use ($requestBody) | |
{ | |
$this->myPlaceLocal->authorization->validateLoggedInUser(); | |
if (empty($requestBody['geotargeting']) || empty($requestBody['impressions'])) | |
{ | |
throw new InvalidApiParameterException("Expecting geo-targeting and impressions."); |
This file contains 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
#!/bin/sh | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' |
This file contains 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
// my initial version | |
function add($x, $y) | |
{ | |
$result = 0; | |
$i = 0; // the first bit to look at | |
$max = max($x, $y); | |
$msb = log($max, 2); // get the most signicant bit | |
$carry = 0; |