Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry session
Debugger
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna! | |
([一-龯]) | |
Regex for matching Hirgana or Katakana | |
([ぁ-んァ-ン]) | |
Regex for matching Non-Hirgana or Non-Katakana | |
([^ぁ-んァ-ン]) | |
Regex for matching Hirgana or Katakana or basic punctuation (、。’) |
"Flash[:notice]‘s message will persist to the next action and should be used when redirecting to another action via the ‘redirect_to’ method. | |
Flash.now[:notice]‘s message will be displayed in the view your are rendering via the ‘render’ method." | |
-- http://ionrails.com/2009/09/19/flashnotice-vs-flash-nownotice/ |
require 'rubygems' | |
require 'mini_magick' | |
img = MiniMagick::Image.from_file("jpeg.jpg") | |
img.combine_options do |c| | |
c.gravity 'Southwest' | |
c.draw 'text 10,10 "whatever"' | |
c.font '-*-helvetica-*-r-*-*-18-*-*-*-*-*-*-2' | |
c.fill("#FFFFFF") | |
end |
Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry sessionDebugger
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"github.com/gin-gonic/gin" | |
"golang.org/x/oauth2" | |
"golang.org/x/oauth2/bitbucket" | |
"golang.org/x/oauth2/github" | |
"golang.org/x/oauth2/google" |
For this example, I have a very simple Node.js applications that increments a counter stored on Redis. I want to run Redis and the node application independently as I want to have the ability to scale the node application depending on the load. To start off, I have 3 instances of the node server running the application. I have an Nginx server in front of node for load balancing the node instances.
Let’s now talk in terms of containers, specifically Docker containers. Simple; 1 container for each service/process!
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
// MIT Licensed | |
// Author: jwilson8767 | |
/** | |
* Waits for an element satisfying selector to exist, then resolves promise with the element. | |
* Useful for resolving race conditions. | |
* | |
* @param selector | |
* @returns {Promise} | |
*/ |