Kind of continue from the other gist how to install LAMP on an Amazon AMI
##Install git
sudo yum install git-core
##Create ssh directory since it doesn't exists by default on the Amazon AMI
proxy_cache_path /tmp/cacheapi levels=1:2 keys_zone=microcacheapi:100m max_size=1g inactive=1d use_temp_path=off; | |
server { | |
listen 443 ssl http2 default_server; | |
listen [::]:443 ssl http2 default_server; | |
server_name example.com; | |
location /api/ { | |
# Rate Limiting | |
limit_req zone=reqlimit burst=20; # Max burst of request |
Kind of continue from the other gist how to install LAMP on an Amazon AMI
##Install git
sudo yum install git-core
##Create ssh directory since it doesn't exists by default on the Amazon AMI
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
currency = {usd: 1, baht: 30.73, yen: 83.447, rupee: 50.21} | |
[Float, Fixnum].each do |number| | |
currency.each do |key, value| | |
number.class_eval "def #{key}; | |
return self/#{value}; | |
end" | |
number.class_eval %{def #{key}_string; | |
return (self * #{value}).to_s+" #{key.upcase}"; | |
end} |
require_relative 'hangman_class_3' | |
hangman = Hangman.new | |
hangman.start do |h| | |
puts h.answer | |
print "#{h.limit} Enter your best guest: " | |
h.guess(gets) | |
end |
require_relative 'hangman_class' | |
hangman = Hangman.new | |
hangman.start | |
until hangman.finish | |
puts hangman.answer | |
print "#{hangman.limit} Enter your best guess: " | |
hangman.guess(gets) |
@words = %w{spiderman superman powerpuf hangman} | |
@finish = false | |
@limit = 8 | |
@win = false | |
@word = @words[rand(@words.length-1)] | |
@answer = "_" * @word.length | |
def guest(answer) | |
@limit -= 1 |
<?php | |
/** | |
* The constants defined here are used as a fallback to whatever options you | |
* end up specifying specifically. | |
* | |
* @var constant string | |
*/ | |
define('WATERMARK_SOURCE', ABSPATH.'/wp-content/themes/mytheme/images/fb_thumb_watermark.png'); | |
define('WATERMARK_ORIENTATION', 'bottom right'); |
if (!window.FB) window.FB = { | |
_apiKey: null, | |
_session: null, | |
_userStatus: "unknown", | |
_logging: true, | |
_inCanvas: window.location.search.indexOf("fb_sig_in_iframe=1") > -1 || window.location.search.indexOf("session=") > -1 || window.location.search.indexOf("signed_request=") > -1 || window.name.indexOf("iframe_canvas") > -1 || window.name.indexOf("app_runner") > -1, | |
_https: window.name.indexOf("_fb_https") > -1, | |
_domain: { | |
api: "https://api.facebook.com/", | |
api_read: "https://api-read.facebook.com/", |
Kind of continue from the other gist how to install LAMP on an Amazon AMI
##Install git
sudo yum install git-core
##Create ssh directory since it doesn't exists by default on the Amazon AMI