#ST3 Side Bar
##Commands
reveal_in_side_bar
- opens sidebar if it is hidden
- highlights currently selected file (and opens it's containing folders)
focus_side_bar
ctrl+0
- moves "cursor" to side bar
var array = [] | |
array[1] = "a value" | |
array[2] = "a new value" | |
console.log(array) // returns ["a value","a new value"] | |
// p.s. console.log() and alert() are interchangeable. If you use console.log the | |
// message appears in your browser's console rather than in a popup. | |
// That's kinda obvious but here's something your probably haven't used yet: |
uri = URI('https://www.your-site.com/home/') | |
https = Net::HTTP.new(uri.host, uri.port) | |
https.use_ssl = true | |
https.verify_mode = OpenSSL::SSL::VERIFY_NONE | |
# use OpenSSL::SSL::VERIFY_PEER instead and https.ca_file for a verified cert | |
https.start do |http| | |
request = Net::HTTP::Get.new uri.request_uri | |
request.basic_auth 'username','password' | |
response = https.head('/home/') |
#The Ruby code your mom should have handed you: | |
# products = { milk => [], eggs => [] } | |
# cart = [] | |
cart << products[:milk].pop | |
if !products[:eggs].empty? | |
6.times do | |
cart << products[:eggs].pop |
# Description: | |
# Corgime | |
# | |
# Dependencies: | |
# None | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: |
var stream = require("stream"), | |
util = require("util"); | |
var LineSplitter = function LineSplitter(options) { | |
options = options || {}; | |
options.objectMode = true; | |
stream.Transform.call(this, options); | |
this.buffer = ""; | |
}; | |
util.inherits(LineSplitter, stream.Transform); |
// NOTE: I previously suggested doing this through Grunt, but had plenty of problems with | |
// my set up. Grunt did some weird things with scope, and I ended up using nodemon. This | |
// setup is now using Gulp. It works exactly how I expect it to and is WAY more concise. | |
var gulp = require('gulp'), | |
spawn = require('child_process').spawn, | |
node; | |
/** | |
* $ gulp server | |
* description: launch the server. If there's a server already running, kill it. |