(Full description and list of commands at - https://npmjs.org/doc/index.html)
Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
| alias glog="git log --graph --pretty=\"format:%C(yellow)%h%Cred%d%Creset %s %C(white) %C(cyan)%an%Creset, %C(green)%ar%Creset\"" |
| <!doctype html> | |
| <html lang="en-us"> | |
| <head> | |
| <title> | |
| [your title] | |
| </title> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1" /> | |
| <link rel="stylesheet" href="" /> | |
| <meta name="viewport" content="width=device-width"> |
| html:5>#wrapper>((header>((#logo>img)+h1+nav>ul>li*3))+(#body>header>h2+p)+(footer>p))*1 | |
| >> Now hit tab to get it to expand |
(Full description and list of commands at - https://npmjs.org/doc/index.html)
Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
| #!/bin/bash | |
| echo "Executing Resque Manager." | |
| start() { | |
| echo -n "Starting resque..." | |
| RAILS_ENV="$TARGET_ENV" QUEUE="v2_processing" VERBOSE="1" nohup bundle exec rake environment resque:work --trace > ./log/resque.log & | |
| return | |
| } | |
| stop() { |
| var MongoClient = require('mongodb').MongoClient; | |
| MongoClient.connect('mongodb://127.0.0.1:27017/inbox', function(err, db) { | |
| if (err) throw err; | |
| var collection = db.collection('test_insert'); | |
| var sample1 = { 'messages.82513': { body: '123\r\n456\r\n789\r\n', db_msg_id: '82513' } }; | |
| var sample2 = { 'messages.12': { body: '123\r\n456\r\n789\r\n', db_msg_id: '12'} }; | |
| var base_doc = { conv_hash: '711_34401', messages: {} }; | |
| //## FAILS ## |
| require 'mongoid' | |
| Mongoid.load!("./mongoid.yml") | |
| Mongoid.raise_not_found_error = false | |
| class Doc | |
| include Mongoid::Document | |
| store_in collection: "testing123" | |
| field :name, type: Integer | |
| field :_id, type: Integer, default: ->{ name } |
| require 'bundler' | |
| require 'socket' | |
| Bundler.require | |
| WS_CLIENTS = {} | |
| WS_CLIENTS_NAME_TO_SOCKET = {} | |
| WS_HOST = Socket.ip_address_list.last.ip_unpack.first) | |
| WS_PORT = 8090 | |
| HTTP_PORT = WS_PORT + 1 |
| #!/bin/bash | |
| readonly ARGS="$@" | |
| readonly DEPLOY_USER="www-data" | |
| clone_repo_at_tag() { | |
| local repo="$1" | |
| local tag="$2" | |
| local project_name="$3" | |
| local repo_dirname="$project_name-$tag" |