Skip to content

Instantly share code, notes, and snippets.

View marianposaceanu's full-sized avatar

Posăceanu Marian marianposaceanu

View GitHub Profile
@igstan
igstan / decluttered-australis-ui.png
Last active August 29, 2015 14:00
Decluttered UI in Firefox 29
decluttered-australis-ui.png
%% ---------------------------------------------------------------------
%%
%% Copyright (c) 2007-2015 Basho Technologies, Inc. All Rights Reserved.
%%
%% This file is provided to you under the Apache License,
%% Version 2.0 (the "License"); you may not use this file
%% except in compliance with the License. You may obtain
%% a copy of the License at
%%
%% http://www.apache.org/licenses/LICENSE-2.0
@jdickey
jdickey / findbreaks.rb
Created May 26, 2013 16:28
FindBreaks - find and list all spec files that broke due to your world-changing one-liner just now.
#!/usr/bin/env ruby
# findbreaks 0.9
# Script to find all spec files in an `rspec` run that report errors and produce
# a list of all failed spec filenames, with each such listed once. Useful if you
# have numerous specs that break due to a world-changing edit you've just made,
# and you want a nice list of the broken specs without having to read through
# hundreds of lines of RSpec bleeding on your terminal. Pick one; fix it; run
# this again; repeat.
#
@marianposaceanu
marianposaceanu / vim_tips.md
Last active December 20, 2015 05:29
Just random VIM tips

VIM Tips

Record a sequence

Use q + [lowercase letter to name the macro] then do stuff and when done q and @a or 22@a to repeat.

Advanced search and replace

s:url("../images/\(.*\)");:url("<%= asset_path '\1' %>");:gi

require_relative './clojure-1.8.0.jar'
def clojure; Java::ClojureLang; end
i = clojure.PersistentHashMap.create(a: 'b')
puts i[:a] #=> 'b'
@robertsosinski
robertsosinski / trigger.sql
Created November 12, 2012 02:51
Make a table readonly in Postgres
create trigger trades_readonly_trigger before insert or update or delete or truncate on trades for each statement execute procedure readonly_trigger_function();
@wookiecooking
wookiecooking / aliases.sh
Created November 30, 2013 00:52
[Shell] Assortment of OSX influenced bash aliases and functions
# Rails Stuff
alias stoprails='kill -9 $(lsof -i :3000 -t)'
alias startrails='rails server -d'
alias restartrails='stopRails && startRails'
#Check PHP For Erroes
alias phpcheck='find ./ -name \*.php | xargs -n 1 php -l'
# ROT13-encode text. Works for decoding, too! ;)
alias rot13='tr a-zA-Z n-za-mN-ZA-M'
@tompng
tompng / tompng_oedo08_codes.md
Last active May 24, 2020 21:46
大江戸Ruby会議の資料に使ったコード集

Typographic glyphs

via

Shortcuts and proper use

name glyph mac other description
curly single quotes ‘ ’ Option+] and Shift+Option+] ALT-0145 and ALT-0146 hover for description
curly double quotes “ ” Option+[ and Shift+Option+[ ALT-0147 and ALT-0148 -