- Dynamic Dispatch
- Dynamic Method
- Ghost Methods
- Dynamic Proxies
- Blank Slate
- Kernel Method
- Flattening the Scope (aka Nested Lexical Scopes)
- Context Probe
- Class Eval (not really a 'spell' more just a demonstration of its usage)
- Class Macros
We can't make this file beautiful and searchable because it's too large.
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
year,month,day,country,region,provstate,city,latitude,longitude,nkill,nwound,nwoundkill | |
2018,1,1,Iraq,Middle East & North Africa,Nineveh,Tal Afar,36.376825,42.448876,3,0,3 | |
2018,1,1,Iraq,Middle East & North Africa,Kirkuk,Kirkuk,35.452112,44.375464,0,0,0 | |
2018,1,1,Pakistan,South Asia,Balochistan,Chaman,30.92211,66.451533,0,2,2 | |
2018,1,1,Pakistan,South Asia,Balochistan,Chaman,30.92211,66.451533,0,6,6 | |
2018,1,1,Nigeria,Sub-Saharan Africa,Adamawa,Madagali,10.88942,13.62832,3,0,3 | |
2018,1,1,Afghanistan,South Asia,Farah,Pusht Rod district,32.48035,62.028915,1,2,3 | |
2018,1,1,Iraq,Middle East & North Africa,Al Anbar,Radhwaniyah,33.18168,44.23542,0,1,1 | |
2018,1,1,Egypt,Middle East & North Africa,Giza,Giza,30.022924,31.185193,2,0,2 | |
2018,1,1,Pakistan,South Asia,Punjab,Multan,30.174426,71.478867,0,1,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
# This is to enable WS support. Credits: # https://gist.github.com/Bubelbub/0a942a0d51a3d329897d | |
# THIS WORKS! for running the example 5.0.0.beta1 chat app on a single instance Elastic beanstalk AWS instance | |
files: | |
"/etc/nginx/conf.d/websockets.conf" : | |
content: | | |
upstream backend { | |
server unix:///var/run/puma/my_app.sock; | |
} |
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
### app access token | |
graph = Koala::Facebook::OAuth.new APP_ID, APP_SECRET | |
graph.get_app_access_token # => APP_TOKEN | |
### create test users with permissions | |
test_users = Koala::Facebook::TestUsers.new app_id: APP_ID, secret: APP_SECRET | |
user = test_users.create true, 'email,user_birthday,user_posts', name: 'Bob' | |
# => | |
# { "id" => USER_ID, | |
# "access_token" => USER_ACCESS_TOKEN, |
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 | |
# Author: Erik Kristensen | |
# Email: erik@erikkristensen.com | |
# License: MIT | |
# Nagios Usage: check_nrpe!check_docker_container!_container_id_ | |
# Usage: ./check_docker_container.sh _container_id_ | |
# | |
# Depending on your docker configuration, root might be required. If your nrpe user has rights | |
# to talk to the docker daemon, then root is not required. This is why root privileges are not |
- Fat Model, Skinny Controller
- Object-Oriented Design Patterns
- Single Responsibility Principle
http://blog.codeclimate.com/blog/2012/10/17/7-ways-to-decompose-fat-activerecord-models/
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
int dataPin = 2; | |
int clockPin = 3; | |
int csPin = 4; | |
byte chars[] = { | |
B00011000, | |
B00111100, | |
B01100110, | |
B11000011, |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
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 SessionsController < ApplicationController | |
skip_before_filter :verify_authenticity_token, only: :saml | |
def new | |
request = Onelogin::Saml::Authrequest.new | |
settings = saml_settings | |
request_doc = request.create_authentication_xml_doc(settings) | |
request_str = request_doc.to_s #.force_encoding("UTF-8") | |
logger.debug request_str |
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
# This is the deployment recipe | |
# You require to install runit on the server. | |
# First you need to declare on which port the application will run | |
# | |
# echo 3000 > port | |
# | |
# Then you can setup a new runit service with | |
# | |
# make setup_service | |
# |
NewerOlder