SPC q q
- quitSPC w /
- split window verticallySPC w
- - split window horizontallySPC 1
- switch to window 1SPC 2
- switch to window 2SPC w c
- delete current windowSPC TAB
- switch to previous bufferSPC b b
- switch buffers
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
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
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
http://net.tutsplus.com/tutorials/javascript-ajax/design-and-code-an-integrated-facebook-app/ | |
https://developers.facebook.com/docs/opengraph/tutorial/ |
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
{ | |
"anypreter_output_inteval": 1, | |
"anypreter_stream_output": false, | |
"bold_folder_labels": false, | |
"detect_slow_plugins": false, | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", | |
".hg", |
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
sudo apt-get update system => for updating system | |
sudo apt-get install build-essential git-core for intalling git | |
sudo apt-get install curl => for installing curl | |
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) => installing rvm | |
echo '[[ -s "/home/{{username}}/.rvm/scripts/rvm" ]] && source "/home/{{username}}/.rvm/scripts/rvm"' >> ~/.bashrc => to load rvm in bashrc |
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
<!DOCTYPE> | |
<html> | |
<head> | |
<title>Dissecting Gmail's Email Attachments - Dropping Files</title> | |
<style> | |
.msg { | |
display: none | |
} | |
.dragging .msg { |
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 file is copied to spec/ when you run 'rails generate rspec:install' | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
require 'rspec/autorun' | |
require 'capybara/rspec' | |
include Warden::Test::Helpers | |
# Requires supporting ruby files with custom matchers and macros, etc, |
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
require 'RMagick' | |
# Auto crop an image by detecting solid edges around them. | |
class AutoCropper | |
# How small we accept a cropped picture to be. E.G. if it was 100x100 and | |
# ratio 0.1, min output should be 10x10 | |
MIN_CROP_RATIO = 0.1 | |
attr_reader :img, :x0, :y0, :x1, :y1, :min_width, :min_height, :rows, :columns, :is_border |
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
require 'prawn' | |
require 'pdf/toolkit' | |
class PdfFiller | |
DOWNLOAD = "/tmp/downloads" | |
FINAL_DIR = "#{Dir.home}/edited_files" | |
attr_reader :file_path | |
def initialize( file_path) |
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; | |
} |
OlderNewer