Skip to content

Instantly share code, notes, and snippets.

View amokan's full-sized avatar

Adam Mokan amokan

  • Grain
  • Chandler, Arizona
  • 03:18 (UTC -07:00)
View GitHub Profile
if [ -f "$rvm_path/scripts/rvm" ]; then
source "$rvm_path/scripts/rvm"
if [ -f ".rvmrc" ]; then
source ".rvmrc"
fi
if [ -f ".ruby-version" ]; then
rvm use `cat .ruby-version`
fi
@amokan
amokan / .irbrc
Created April 18, 2013 00:28
my .irbrc file
# Info/code for this file were borrowed from the following places:
# http://bit.ly/174dkWL
# https://gist.github.com/adamcrown/932231
# https://gist.github.com/patmcnally/893833
begin
# ansi colors
ANSI = {}
ANSI[:RESET] = "\e[0m"

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
#include <Shieldbot.h>
#include <Wire.h>
#define UNO32_DEVICE 4
#define SENSOR_1 1
#define SENSOR_2 2
#define SENSOR_3 3
#define SENSOR_4 4
#define SENSOR_5 5
# This file is for unifying the coding style for
# different editors and IDEs
#
# editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
@amokan
amokan / gist:3902689
Created October 16, 2012 23:16 — forked from dgalarza/gist:3248130
update jenkins Updatecenter from CLI
$ java -jar jenkins-cli.jar -s http://localhost:9000 install-plugin findbugs
findbugs is neither a valid file, URL, nor a plugin artifact name in the update center
No update center data is retrieved yet from: http://updates.jenkins-ci.org/update-center.json
findbugs looks like a short plugin name. Did you mean 'null'?
# Specifying a full URL works!
$ java -jar jenkins-cli.jar -s http://localhost:9020 install-plugin http://updates.jenkins-ci.org/download/plugins/AdaptivePlugin/0.1/AdaptivePlugin.hpi
# Get the update center ourself
@amokan
amokan / gist:3881064
Created October 12, 2012 19:36
jenkins-cli commands (v1.485)
build
Builds a job, and optionally waits until its completion.
cancel-quiet-down
Cancel the effect of the "quiet-down" command.
clear-queue
Clears the build queue
connect-node
Reconnect to a node
copy-job
Copies a job.
@amokan
amokan / Preferences.sublime-settings
Last active October 7, 2015 16:48
my Sublime Text 2 user preferences
{
"auto_complete_commit_on_tab": true,
"auto_indent": true,
"bold_folder_labels": true,
"close_windows_when_empty": false,
"color_scheme": "Packages/Color Scheme - Default/Cobalt.tmTheme",
"default_encoding": "UTF-8",
"draw_white_space": "selection",
"ensure_newline_at_eof_on_save": true,
"find_selected_text": true,
@amokan
amokan / server.js
Created March 13, 2012 23:35 — forked from kieran/server.js
basic Barista example
var Router = require('barista').Router // <-- require the router
, http = require('http')
, util = require('util')
var router = new Router // <-- create the router
// define some routes
router.get('/').to('app.index')
router.resource('products')