Skip to content

Instantly share code, notes, and snippets.

View wickchucked's full-sized avatar

Ed Winn wickchucked

  • Wick <--> Labs
  • Marshall, MN
View GitHub Profile
{
// The command to execute for the terminal, leave blank for the OS default
// On OS X the terminal can be set to iTerm.sh to execute iTerm
"terminal": "",
// A list of default parameters to pass to the terminal, this can be
// overridden by passing the "parameters" key with a list value to the args
// dict when calling the "open_terminal" or "open_terminal_project_folder"
// commands
"parameters": ["cd \\"]
@wickchucked
wickchucked / gist:5151978
Created March 13, 2013 13:21
Key bindings
[
{ "keys": ["ctrl+t"], "command": "insert", "args": {"characters": "¬"} },
{ "keys": ["ctrl+shift+."], "command": "bis_erb" }
]
path = self.view.file_name()
current_user = os.environ.get("USERNAME")
directory = os.path.dirname(path)
user_pos = directory.find(current_user).upper()
print "User Pos:" + user_pos
base_dir = directory(user_pos:)
file_name = os.path.basename(path)
directory = base_dir + "\BisCmd.bis"
print "Directory:" + directory
output = directtory + "|" + file_name + "|" + text
@wickchucked
wickchucked / Sanitize Run Command Routine
Created April 15, 2013 18:15
# Sanitize run command
@. # Sanitize result from duplicate labels (@ to '@')
@0200:(<mrpt>) .
@ rnm -1 .
@ lzr,-1 ,<cc>i4 chg <scc>i4 <cc> -1 chg <wcc>i4 <cc> +3 .
@ loc,-1,2,0205 'af' 1-<cc> '**** MULTI-LINE-TEXT - '<mrpt>(p)' ****' ,<mln>i7 .
@ inc,5 <mln> rdl,-1,<mln> 1-<cc> <code>s .
@ lcv,0000 '' <code> 'next' <b>i3 inc,5 <b> lcv,0000 '' <code> 'lines' <e>i3 dec <e> .
@ ldv <lns>i7=<code>(<b>-<e>) chg <endln>i7 <mln> + <lns> + 1 .
@0201:inc <mln> if <mln> eq <endln>,(0205) .
@ rdl,-1,<mln> 1-<cc> <rslt>s ldv,l <rslt> ldv <srslt>s<scc>=<rs
@wickchucked
wickchucked / gist:5477537
Last active December 16, 2015 18:28
Rails commands
rails new app-name --skip-test-unit --database=postgresql
sudo -u postgres service postgresql stop
sudo -u postgres psql
# \password
# create user blog with password 'secret';
# create database blog_production owner blog;
# \q
.
.
. Example usage of mql command
.
.
*===============================================================================
:DEFINE CABDRW_ '0,F' Test Table
:DEFINE DRW_ 'F0' Test Table
:DEFINE TABLE_ <tbl>F0 Test Table
@.
@wickchucked
wickchucked / scrape.js
Created May 16, 2013 16:00
Finds products from test page and reads title, price, image url, and a boolean for the in-stock status.
var request = require('request');
var cheerio = require('cheerio');
// Requirements
// returns the title, price, image url, and a boolean for the in-stock status?
//
// IN STOCK PRODUCT
// http://parser-static.trackif.com/product.php
//
@wickchucked
wickchucked / Phusion set up
Created May 20, 2013 01:07
Phusion setup
Nginx with Passenger support was successfully installed.
The Nginx configuration file (/opt/nginx/conf/nginx.conf)
must contain the correct configuration options in order for Phusion Passenger
to function correctly.
This installer has already modified the configuration file for you! The
following configuration snippet was inserted:
http {

Ruby on Rails development setup on Ubuntu 12.04

System update

# change mirror to ubuntu.osuosl.org first
sudo apt-get update

Install common libraries

{
"close_windows_when_empty": false,
"color_scheme": "Packages/bis-sublime/BISColorScheme.tmTheme",
"theme": "Soda Dark.sublime-theme",
"soda_classic_tabs": true,
"soda_folder_icons": true,
"default_encoding": "UTF-8",
"draw_white_space": "all",
"find_selected_text": true,
"fold_buttons": false,