Skip to content

Instantly share code, notes, and snippets.

View poor666's full-sized avatar
🏠
Working from home

João Ramos poor666

🏠
Working from home
View GitHub Profile
@addyosmani
addyosmani / README.md
Last active May 10, 2025 11:24 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

# Please note: this is an oversimplification of the real problem :)
# Say you have this class definition:
class One
attr_accessor :children
def initialize data
puts "Initialize One"
@children = data.map do |item|
@include
include / rbenvsetup.md
Last active August 29, 2015 14:03
homebrew_rbenv

Homebrew

$ ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
$ brew doctor

$ cat > ~/.profile
homebrew=/usr/local/bin:/usr/local/sbin
export PATH=$homebrew:$PATH

$ source ~/.profile

@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@jbenet
jbenet / simple-git-branching-model.md
Last active May 3, 2025 18:07
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@francoishill
francoishill / gist:6483997
Created September 8, 2013 11:27
Media queries for mobile devices - Requires at least requires the meta viewport tag with content 'width=device-width'
/*http://i-skool.co.uk/mobile-development/web-design-for-mobiles-and-tablets-viewport-sizes/*/
/*At least requires the meta viewport tag with content 'width=device-width'*/
@media only screen and (max-width: 1080px) and (orientation : portrait) {
/* PORTRAIT:
Windows Surface Pro*/
}
@media only screen and (max-width: 800px) and (orientation : portrait) {
/* PORTRAIT:
Acer Iconia Tab A100
@todgru
todgru / starttmux.sh
Last active September 26, 2024 04:28
Start up tmux with custom windows, panes and applications running
#!/bin/sh
#
# Setup a work space called `work` with two windows
# first window has 3 panes.
# The first pane set at 65%, split horizontally, set to api root and running vim
# pane 2 is split at 25% and running redis-server
# pane 3 is set to api root and bash prompt.
# note: `api` aliased to `cd ~/path/to/work`
#
session="work"
@Jamedjo
Jamedjo / custom_plan.rb
Created March 26, 2013 01:37
Zeus command to run asset compilation in development environment with assets group. Usage: `zeus assets some:nested:task' translates to `rake assets:some:nested:task` E.g. `zeus assets precompile` instead of `rake assets:precompile`
require 'zeus/rails'
class CustomPlan < Zeus::Rails
def assets_environment
Bundler.require(:assets)
ENV['RAILS_GROUPS'] = "assets"
end
def assets_run
@bsodmike
bsodmike / application.rb
Created October 26, 2012 14:21
Caching in Rails 3.2.8 including Cache Sweeping with Redis
# set default cache store as redis
config.cache_store = :redis_store
@jpinnix
jpinnix / gist:3186304
Created July 27, 2012 05:25
Installing Ruby 1.8.7-p358 with rbenv on Mountain Lion
Follow the instructions here: The Hitchhiker's Guide to Riding a
Mountain Lion http://j.mp/Qm5UJD, including installing XQuartz.
After installing XQuartz set the correct path to the X11 library to
install Ruby 1.8.7-p358 with rbenv:
export CPPFLAGS=-I/opt/X11/include
then let the compiler know where gcc-4.2 is: