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
#!/usr/bin/env ruby | |
require 'pp' | |
# Variables | |
maxElements = 100 | |
randomLowNumber = -10000 | |
randomHighNumber = 10000 | |
def mergeSort ( toSort ) |
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
#!/usr/bin/env ruby | |
require 'pp' | |
class Deck | |
@@deck = [ :'2S', :'3S', :'4S', :'5S', :'6S', :'7S', :'8S', :'9S', :'10S', :'JS', :'QS', :'KS', :'AS', | |
:'2H', :'3H', :'4H', :'5H', :'6H', :'7H', :'8H', :'9H', :'10H', :'JH', :'QH', :'KH', :'AH', | |
:'2D', :'3D', :'4D', :'5D', :'6D', :'7D', :'8D', :'9D', :'10D', :'JD', :'QD', :'KD', :'AD', | |
:'2C', :'3C', :'4C', :'5C', :'6C', :'7C', :'8C', :'9C', :'10C', :'JC', :'QC', :'KC', :'AC'] |
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
class IsulaController < ApplicationController | |
skip_before_filter :verify_authenticity_token | |
def send_mail | |
# render plain: params.to_json | |
ourResponse = Hash.new | |
ourResponse = { type: "error", message: "No name provided" } if params[:userName].nil? | |
ourResponse = { type: "error", message: "No email provided" } if params[:userEmail].nil? | |
ourResponse = { type: "error", message: "No phone provided" } if params[:userPhone].nil? |
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 { | |
listen 80 default; | |
# server_name ~^(www\.)?(?<domain>.+)$; | |
# The goal here is to allow for subdomains. We stack in reverse | |
server_name ~^(?<subdomain>\.)?(?<domain>.+)$; | |
root /opt/sites/$domain/$subdomain/public_html/; | |
access_log /opt/sites/$domain/logs/access.log; |
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
stephanie@niribu ~/Projects/Isula/Websites/isulanet $ git remote add demo dokku@demo.isula.net:isula-web | |
stephanie@niribu ~/Projects/Isula/Websites/isulanet $ git push demo master | |
The authenticity of host 'demo.isula.net (54.149.184.144)' can't be established. | |
ECDSA key fingerprint is 58:2b:af:a9:2f:4c:8e:8d:c9:f3:b3:27:46:61:eb:df. | |
Are you sure you want to continue connecting (yes/no)? yes | |
Warning: Permanently added 'demo.isula.net,54.149.184.144' (ECDSA) to the list of known hosts. | |
Counting objects: 773, done. | |
Delta compression using up to 4 threads. | |
Compressing objects: 100% (749/749), done. | |
Writing objects: 100% (773/773), 40.76 MiB | 1.48 MiB/s, done. |
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
stephanie@niribu ~/Projects/Isula/Projects $ git clone git@github.com:heroku/ruby-rails-sample.git | |
Cloning into 'ruby-rails-sample'... | |
remote: Counting objects: 231, done. | |
remote: Total 231 (delta 0), reused 0 (delta 0), pack-reused 231 | |
Receiving objects: 100% (231/231), 39.29 KiB | 0 bytes/s, done. | |
Resolving deltas: 100% (88/88), done. | |
Checking connectivity... done. | |
stephanie@niribu ~/Projects/Isula/Projects $ ls | |
ruby-rails-sample website-ogtools | |
stephanie@niribu ~/Projects/Isula/Projects $ cd ruby-rails-sample/ |
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 { | |
listen [::]:80; | |
listen 80; | |
server_name website-isula-net.demo.isula.net ; | |
access_log /var/log/nginx/website-isula-net-access.log; | |
error_log /var/log/nginx/website-isula-net-error.log; | |
location / { | |
set_by_lua $results 'os.execute("sudo /opt/bin/spinup website-isula-net")'; | |
gzip on; |
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
root@demo:~# docker ps -l | tail -n -1 | awk '{ print $1 }' | xargs docker stats --no-stream | |
CONTAINER CPU % MEM USAGE/LIMIT MEM % NET I/O | |
c5fd4846b75b 0.05% 86.65 MB/1.041 GB 8.33% 5.461 kB/46.48 kB | |
root@demo:~# |
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 { | |
listen [::]:80; | |
listen 80; | |
server_name website-isula-net.demo.isula.net ; | |
access_log /var/log/nginx/website-isula-net-access.log; | |
error_log /var/log/nginx/website-isula-net-error.log; | |
location / { | |
set_by_lua $results 'os.execute("sudo /opt/bin/spinup website-isula-net")'; | |
gzip on; |
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 { | |
listen [::]:$NGINX_PORT; | |
listen $NGINX_PORT; | |
server_name $NOSSL_SERVER_NAME; | |
access_log /var/log/nginx/${APP}-access.log; | |
error_log /var/log/nginx/${APP}-error.log; | |
location / { | |
set_by_lua $results 'os.execute("sudo\ /opt/bin/spinup\ $APP")'; | |
gzip on; |