Skip to content

Instantly share code, notes, and snippets.

View Resonious's full-sized avatar
🕶️
💪 👔 🤳

Nigel Baillie Resonious

🕶️
💪 👔 🤳
View GitHub Profile
@Resonious
Resonious / GoToSpec.py
Created August 8, 2014 14:35
Really quick, sloppy (Python isn't my really my jam) sublime text 3 command for switching between spec and implementation in a Rails app.
import sublime, sublime_plugin, os.path, string
class GoToSpecCommand(sublime_plugin.TextCommand):
def run(self, edit):
file_name = self.view.file_name()
if not ('/app/' in file_name or ('/lib/' in file_name and not '/spec/lib/' in file_name)):
if '/spec/lib/' in file_name or '/spec/' in file_name:
file_path = ""
if '/spec/lib/' in file_name:
@Resonious
Resonious / windows_vimrc
Last active August 29, 2015 14:10
My lame vimrc for Windows. Don't make fun of me.
execute pathogen#infect()
syntax on
filetype plugin indent on
" colorscheme spink
colorscheme phoenix
set expandtab
let s:tabwidth=4
@Resonious
Resonious / end_of_bashrc.sh
Created April 1, 2015 20:34
Stuff I put at the end of my .bashrc to make neovim work
PATH=$PATH:$HOME/neovim/build/bin # nvim!
export VIM=$HOME/neovim/runtime # direct neovim to syntax files and such
alias vim='nvim' # replace vim with NEOVIM
@Resonious
Resonious / linux_nvimrc
Last active February 27, 2017 00:05
linux_nvimrc
execute pathogen#infect()
set t_Co=256
syntax on
filetype plugin indent on
" Tabs are 2 spaces by default
set expandtab
set shiftwidth=2
set softtabstop=2
@Resonious
Resonious / emscripten_mruby_build_config.rb
Created May 31, 2016 21:28
MRuby build_config.rb entry for working emscripten. So yes this gives you an mruby vm within the javascript vm...
MRuby::Build.new('emscripten') do |conf|
toolchain :gcc
conf.cc.command = "emcc"
# NOTE the _MSC_VER is so that mruby won't define the 'round' function
conf.cc.compile_options = "%{infile} %{flags} -D_MSC_VER=2000 -o %{outfile}"
conf.linker.command = "emcc"
conf.linker.flags << "-O3"
conf.linker.link_options = "%{objs} %{libs} %{flags} -o %{outfile}"
// MACOS:
[
{ "key": "shift+cmd+[", "command": "workbench.action.previousEditor",
"when": "editorTextFocus" },
{ "key": "shift+cmd+]", "command": "workbench.action.nextEditor",
"when": "editorTextFocus" },
{ "key": "ctrl+y", "command": "scrollLineUp",
"when": "!terminalFocus" },
{ "key": "ctrl+e", "command": "scrollLineDown",
"when": "!terminalFocus" },
#/bin/bash
#
# Source this file and use these functions
#
install_neovim() {
echo "========= NEOVIM: ========="
sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt-get update

Keybase proof

I hereby claim:

  • I am resonious on github.
  • I am resonious (https://keybase.io/resonious) on keybase.
  • I have a public key ASDSjFzqNbO_JlieMX706Ahfo70lvmivZkVaeH2y0SKugwo

To claim this, I am signing this object:

def by_order_production_deadline_then_customer(list)
by_deadline = sort_order(:production_deadline)
by_customer = sort_order(:customer_name)
list.sort do |a, b|
primary_sort_order = by_deadline[a, b]
secondary_sort_order = by_customer[a, b]
if primary_sort_order != 0
primary_sort_order
begin
require 'nokogiri'
require 'faraday'
require 'io/console'
require 'byebug'
rescue LoadError => e
STDERR.puts e
STDERR.puts "please execute"
STDERR.puts " $ gem install nokogiri faraday byebug"
exit 3