Skip to content

Instantly share code, notes, and snippets.

@caiges
caiges / CodeFormatter.sublime-settings
Last active August 29, 2015 13:57
Sublime code formatter settings
{
// Path for PHP executable, e.g. "C:/Program Files/PHP/php.exe". If empty, uses command "php" from system environments
"codeformatter_php_path": "",
"codeformatter_php_options":
{
"indent_size": 2, // Indent size
"indent_with_tabs": false, // Indent with tabs or spaces
"indent_style": "k&r", // Indent the code in k&r, allman, gnu or whitesmiths style
"newline_before_comment": true, // add new line before comment block
{
"color_scheme": "Packages/Theme - Nil/Big Duo.tmTheme",
"ignored_packages":
[
"Vintage"
],
"tab_size": 2,
"theme": "Nil.sublime-theme",
"translate_tabs_to_spaces": true,
"word_wrap": true,
{
"color_scheme": "Packages/Dimmed Color Scheme/dimmed-monokai.tmTheme",
"font_face": "Source Code Pro",
"font_size": 12,
"ignored_packages":
[
],
"tab_size": 2,
"theme": "Piatto Dark.sublime-theme",
"translate_tabs_to_spaces": true,
@caiges
caiges / Preferences.sublime-settings
Created January 21, 2014 21:33
Sublime Settings
{
"color_scheme": "Packages/Theme - Farzher/WebDeveloperDark.tmTheme",
"font_face": "Source Code Pro",
"font_size": 12,
"ignored_packages":
[
],
"tab_size": 2,
"theme": "Piatto Dark.sublime-theme",
"translate_tabs_to_spaces": true,
@caiges
caiges / Preferences.sublime-settings
Created December 18, 2013 15:28
Flat Themed Sublime User Preferences
{
"color_scheme": "Packages/Theme - Piatto/Piatto Dark.tmTheme",
"ignored_packages":
[
"Vintage"
],
"theme": "itg.flat.dark.sublime-theme"
}
@caiges
caiges / spec_helper.rb
Created December 9, 2013 22:18
Rails engine spec helper
# Configure Rails Environment
ENV["RAILS_ENV"] = "test"
require "./dummy/config/environment.rb"
require "rails/test_help"
require 'simplecov'
require 'simplecov-json'
Rails.backtrace_cleaner.remove_silencers!
@caiges
caiges / .vimrc
Created September 4, 2013 01:17
Vim config
" Use pathogen to easily modify the runtime path to include all
" We don't need vi compatibility
set nocompatible
" Plugins under the ~/.vim/bundle directory
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
" Basic settings
syntax on
@caiges
caiges / gist:6214747
Created August 12, 2013 20:19
Rename git branches.
# Stolen from http://sebgoo.blogspot.com/2012/04/git-rename-branch-local-and-remote.html
#rename local branch
git branch -m old-branch-name new-branch-name
#delete remote branch with old name
git push origin :old-branch-name
#create remote renamed branch
git push origin new-branch-name
@caiges
caiges / gist:5913747
Created July 2, 2013 22:17
Firefox profile for the Python Selenium driver. This ignores untrusted certs and bypasses default browser checks.
from selenium import webdriver
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
class Firefox(webdriver.Firefox):
def __init__(self, accept_untrusted_certs = True):
binary = FirefoxBinary(firefox_path = '/Users/cnichols/Applications/Firefox.app/Contents/MacOS/firefox')
profile = webdriver.FirefoxProfile()
profile.accept_untrusted_certs = accept_untrusted_certs
profile.set_preference('browser.shell.checkDefaultBrowser', False)
@caiges
caiges / xkb-options-caps-to-ctl
Created June 6, 2013 23:37
Make caps ctrl :)
/usr/bin/setxkbmap -option "ctrl:nocaps"