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
Theme: | |
Theme - Soda | |
Colour Scheme: | |
RailsCasts Colour Scheme | |
Package Installed: | |
Package Control | |
SublimeLinter | |
SideBarEnhancements | |
Alignment | |
All Autocomplete |
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
var inputElm = [1,7,10,16,17,32]; | |
var numberOfCluster = 3; | |
function findMean(inputArray){ | |
var sum = 0; | |
for( var i = 0; i < inputArray.length; i++ ){ | |
sum += inputArray[i] | |
} | |
var avg = sum/inputArray.length; | |
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 | |
sudo su | |
#============================ | |
#Create deploy user | |
DEPLOY_USER=deploy | |
DEPLOY_USER_PASSWORD=deploy | |
#============================ | |
#create deploy user | |
adduser --disabled-password --gecos "" ${DEPLOY_USER} | |
sudo adduser ${DEPLOY_USER} sudo |
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
#request header | |
Content-type: application/x-www-form-urlencoded | |
User-Agent: Fiddler | |
Host: localhost:13000 | |
Content-Length: 84 | |
#Request Body | |
title="aaabbb"&post_images_attributes[0][_destroy]=1&post_images_attributes[0][id]=4 |
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
server { | |
server_name subdomain.example.com example.com www.example.com; | |
listen 80; | |
root /home/deploy/www/my_site/public; | |
index index.html index.htm; | |
#try file when server_name is visited | |
#@fallback default to 500 | |
#=404 will be 404 |
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
#list all vm id | |
vagrant global-status | |
#delete vm | |
vagrant destroy {id} | |
#create vm | |
vagrant init {box_name} | |
#start vm | |
vagrant up | |
#reload config |
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 | |
#============================== | |
#Install beanstalkd - from apt-get | |
#https://www.digitalocean.com/community/tutorials/how-to-install-and-use-beanstalkd-work-queue-on-a-vps | |
#============================== | |
sudo apt-get install beanstalkd -y < "/dev/null" |
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 | |
#============================ | |
#Ubuntu 14.04 LMNR Webserver Stack Provision Script(Linux Mysql Nginx Rails) | |
#install via "sudo curl -L <url/to/lmnrr.sh> | bash" | |
#============================ | |
#============================ | |
#result hint set up | |
#=========================== | |
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
#To solve the InsecurePlatformWarning | |
#========================================== | |
#for ubuntu | |
sudo apt-get install libffi-dev libssl-dev | |
pip install pyopenssl ndg-httpsclient pyasn1 |
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
#Paging | |
gem "kaminari" | |
#mobile Push notification | |
gem 'rpush' | |
#Image upload | |
gem "rmagick" | |
gem "carrierwave" |
OlderNewer