Open terminal and type:
1. Create a directory at ~/bin:
mkdir ~/bin
2. Copy sublime executable to your ~/bin directory:
require 'bunny' | |
b_con = Bunny.new(host: 'localhost', port: 5672, logging: true) | |
b_con.start | |
b_q = b_con.queue('events') | |
b_ex = b_con.exchange('events', type: :topic) | |
b_ex.publish('message!!', key: 'usermanager.user.login') |
# -*- encoding : utf-8 -*- | |
set :assets_dependencies, %w(app/assets lib/assets vendor/assets Gemfile.lock config/routes.rb) | |
namespace :deploy do | |
namespace :assets do | |
desc <<-DESC | |
Run the asset precompilation rake task. You can specify the full path \ | |
to the rake executable by setting the rake variable. You can also \ |
/* | |
Chrome Developer Tools - Monokai Color Theme | |
Author: Béres Máté Csaba / bjmatt.com / @bjmatt / beres.mate@bjmatt.com | |
----------------------------------------------------------------------------------------------------------- | |
Installation: | |
1. Find your Chrome's user stylesheets directory: |
function go() { | |
var userId = prompt('Username?', 'Guest'); | |
var userData = { name: userId }; | |
tryCreateUser(userId, userData); | |
} | |
var USERS_LOCATION = 'https://SampleChat.firebaseIO-demo.com/users'; | |
function userCreated(userId, success) { | |
if (!success) { |
license: gpl-3.0 |
import json | |
import tornado.web | |
class JsonHandler(BaseHandler): | |
"""Request handler where requests and responses speak JSON.""" | |
def prepare(self): | |
# Incorporate request JSON into arguments dictionary. | |
if self.request.body: | |
try: |
/*************************************************** | |
* Simple and elegant, no code complexity | |
* Disadvantages: Requires warming all data into server memory (could take a long time for MBs of data or millions of records) | |
* (This disadvantage should go away as we add optimizations to the core product) | |
***************************************************/ | |
var fb = firebase.database.ref(); | |
/** | |
* @param {string} emailAddress |
You can configure esformatter by changing ~/.esformatter
See the esformatter default https://github.com/millermedeiros/esformatter/blob/master/lib/preset/default.json for configuration examples.
You will need the esformatter binary available in your path to run the indent command
npm install -g esformatter
#WebStorm
Cygwin
with "PowerBash"
Begin with the guide by @nullivex here for general installation. NOTE: This is all with 32-bit stuff even on x64 platform. Cygwin32
, and WebStorm
and Node.js
etc all set up 32-bit. You may skip the Git
parts of that guide, and instead install Cygwin
and the git
and openssh
it contains. Otherwise, you must NOT set up git
in Cygwin
so that the Native Git
is found. But, that would sort of negate most of the gains herein. If you already use Cygwin
and its git
and have openssh
keys all set up for Github and etc, this is a way to keep one set of configurations, and a familiar shell.
This will set up WebStorm
to use Cygwin
versions of everything except for:
Node.js
(because there is no Cygwin
version currently)Python
(because some of the Node.js
/npm
thin