A Pen by Jesse Sutherland on CodePen.
This file contains hidden or 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
# Source: https://gist.github.com/vfarcic/8301efb15748af1da3e376b7132e519e | |
################################################################### | |
# Should We Run Databases In Kubernetes? CloudNativePG PostgreSQL # | |
# https://youtu.be/Ny9RxM6H6Hg # | |
################################################################### | |
# Additional Info: | |
# - CloudNativePG: https://cloudnative-pg.io | |
# - EDB: https://enterprisedb.com |
This file contains hidden or 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
# Source: TODO: | |
######### | |
# TODO: # | |
# TODO: # | |
######### | |
# Additional Info: | |
# - Production-Ready Kubernetes Clusters Using Crossplane Compositions: https://youtu.be/uMC2QQfMctg | |
# - How To Shift Left Infrastructure Management Using Crossplane Compositions: https://youtu.be/AtbS1u2j7po |
We can't make this file beautiful and searchable because it's too large.
This file contains hidden or 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 hidden or 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 hidden or 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
[aaron@TC omglolwut (master)]$ cat lib/tasks/disable_autoload_during_migrations.rake | |
task :disable_autoload do | |
ActiveSupport::Dependencies.class_eval do | |
extend Module.new { | |
def load_file(path, const_paths = loadable_constants_for_path(path)) | |
return if path.starts_with? File.join(Rails.application.root, 'app', 'models') | |
super | |
end | |
} | |
end |
This file contains hidden or 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, |
- 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
This file contains hidden or 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: [email protected] | |
# 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/
NewerOlder