- Install node.js https://nodejs.org/en/
- File extensions for Javascript applications is
.js
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
sudo DEBIAN_FRONTEND=noninteractive apt-get update | |
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade | |
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade | |
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install language-pack-en-base | |
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install python-software-properties | |
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common | |
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install bzip2 build-essential apt-transport-https | |
# Install node |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Puppet</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.3/TweenMax.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.3/TimelineMax.min.js"></script> | |
<style> | |
.window { | |
position: relative; |
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
sudo apt-get update | |
sudo apt-get install -y software-properties-common | |
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php -y | |
sudo apt-get update | |
sudo apt-get install -y php7.0 libapache2-mod-php7.0 php7.0-cli php7.0-mcrypt php7.0-mysql php7.0-mbstring php7.0-gd php7.0-curl php7.0-mcrypt | |
sudo a2dismod php5 | |
sudo a2enmod php7.0 | |
sudo service apache2 restart |
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
function parse(eq) { | |
var nest = 0; | |
eq = eq.reduce(function(acc, val) { | |
if (val == '(') { | |
nest++; | |
} else if (val == ')') { | |
nest--; | |
} | |
if (val == '(' && nest == 1) { |
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
// Helper function to clone array | |
function cloneArray(arr) { | |
return arr.slice(); | |
} | |
// Helper function to generate random number array | |
function randomArray(min, max, len) { | |
// Set default values | |
min = min || 0; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
.noscroll { | |
overflow: hidden; | |
} |
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
# Always run this line first | |
sudo apt-get update | |
# Almost always install a web server | |
sudo apt-get install -y apache2 | |
# Install PHP + Apache PHP Module | |
sudo apt-get install -y php5 libapache2-mod-php5 php5-mcrypt | |
sudo apt-get install -y php5-gd libssh2-php |
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
- (void)reserveAuth | |
{ | |
NSString * http_method = @"POST"; | |
NSString * request_url = @"https://api.twitter.com/oauth/request_token"; | |
NSString * oauth_consumer_key = @"bcn3PUKI0PZoxfPTqEDkMru9A"; | |
NSString * oauth_consumer_secret = @"YiVeSteQBplk8xzAtuoulA7i2vLkVF5kIwc5x1A6ZaxmugdmXg"; | |
NSString * oauth_nonce = [[NSUUID UUID] UUIDString]; | |
NSString * oauth_signature = @""; | |
NSString * oauth_signature_method = @"HMAC-SHA1"; |
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/bash | |
# Write to /usr/local/ec2/ec2-host-update.sh | |
# Execute chmod 755 ec2-host-update.sh | |
# Append /usr/local/ec2/ec2-host-update.sh to /etc/rc.local | |
# Referenced: http://realguess.net/2013/12/06/amazon-route-53-via-command-line/ | |
if ! type "aws" > /dev/null; then |
NewerOlder