Skip to content

Instantly share code, notes, and snippets.

View lacostenycoder's full-sized avatar
👓
Tooling not fooling

Lance Jordan lacostenycoder

👓
Tooling not fooling
View GitHub Profile
source 'https://rubygems.org'
ruby '2.1.2'
gem 'rails', '4.2.0'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'bcrypt'
@lacostenycoder
lacostenycoder / README.md
Created January 16, 2016 07:07
Ruby Easy PATH Variable Output

Simple way to quickly see what's in your current $PATH variable.

@lacostenycoder
lacostenycoder / pre-commit
Created July 19, 2016 01:18 — forked from wacko/pre-commit
Git hook to avoid commit debug lines (binding.pry console.log debugger...)
#!/usr/bin/env ruby
# Validates that you don't commit forbidden keywords to the repo
# You can skip this checking with 'git commit --no-verify'
exit 0 if ARGV.include?('--no-verify')
# Update this list with your own forbidden keywords
KEYWORDS = %w(binding.pry console.log debugger)
def red(text) "\033[31m#{text}\033[0m"; end
@lacostenycoder
lacostenycoder / Vagrantfile
Created September 28, 2016 15:59
Vagrantfile Ruby RBENV & Postgres. Includes hack to solve PG default Encoding Issues
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
sudo apt-get -y update
sudo apt-get -y install curl git-core python-software-properties ruby-dev libpq-dev build-essential nginx libsqlite3-0 libsqlite3-dev libxml2 libxml2-dev libxslt1-dev nodejs imagemagick
sudo apt-get -y install libcurl4-openssl-dev
sudo apt-get -y install libc6 zlib1q
sudo apt-get -y install postgresql postgresql-contrib
# System prerequisites
@lacostenycoder
lacostenycoder / index.html
Created January 14, 2017 09:06
Chrome Autofill Exploit Example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test Chrome Autofill Hack</title>
</head>
<style media="screen">
.hidden {
/*display: none;*/
}
@lacostenycoder
lacostenycoder / FlashHack
Last active January 30, 2017 01:28
Hack to avoid white flashes new tabs on Chrome (night mode)
on run {input, parameters}
set the_application to (path to frontmost application as Unicode text)
repeat 5 times
tell application "System Events"
key code 107
end tell
end repeat
@lacostenycoder
lacostenycoder / vimrc
Created March 6, 2017 17:42
Basic vimrc file
syntax on
set shiftwidth=2
set number
set tabstop=2
set backspace=2
set paste
set hlsearch
set ruler
set laststatus=2
nnoremap <C-L> :nohl<CR><C-L>
@lacostenycoder
lacostenycoder / test-atom-url.sh
Last active March 18, 2017 09:41
Test Atom Handler
echo "test file line one" > ~/Desktop/test.txt
echo "test file line two" >> ~/Desktop/test.txt
#echo "<a>
username="$(whoami)"
url="atm://open?url=file://%2FUsers%2F$username%2FDesktop%2Ftest.txt&line=2"
htmlfile="/Users/$username/Desktop/test.html"
touch $htmlfile
echo "<a href='$url'>$url</a>" > $htmlfile
open $htmlfile
@lacostenycoder
lacostenycoder / .vimrc-rails
Created March 20, 2017 21:46
Nice themed ruby rails vim setup
set nocompatible " be iMproved
" For vundle
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#rc()
call vundle#begin()
" Dependencies of snipmate
Bundle "MarcWeber/vim-addon-mw-utils"
@lacostenycoder
lacostenycoder / ruby.vim
Created March 20, 2017 22:16
vim-ruby syntax patched to support vim 7.3 (old linux etc.)
" Vim syntax file
" Language: Ruby
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" ----------------------------------------------------------------------------
"
" Previous Maintainer: Mirko Nasato
" Thanks to perl.vim authors, and to Reimer Behrends. :-) (MN)
" ----------------------------------------------------------------------------