Skip to content

Instantly share code, notes, and snippets.

View buritica's full-sized avatar
💭
💀

Juan Pablo Buriticá buritica

💭
💀
View GitHub Profile
@dhrrgn
dhrrgn / init.rb
Created April 1, 2011 00:19
A simple initialization script to create vhosts.
#!/usr/bin/env ruby
# USAGE: sudo ./init.rb project_name path/to/web/root
# NOTE: This file must be run with root privileges (sudo).
# You must also give it exec permissions: chmod +x init.rb
# This should include the trailing slash
DEFAULT_ROOT = '/Users/dan/Sites/'
VHOST_FOLDER = '/etc/apache2/sites/'
@cowboy
cowboy / clone_fast.rb
Created April 12, 2011 21:19
Ruby: Clone Yer GitHub Repos, Fast!
# /usr/bin/env ruby
puts <<-EOF
Clone Yer GitHub Repos, Fast! - v0.2.1 - 4/13/2011
http://benalman.com/
For when you're on a new computer and need all your stuff, fast!
EOF
copyright = <<-EOF
@gf3
gf3 / ago.js
Created June 2, 2011 18:43
Super small relative dates
module.exports = (function(){
const MS =
{ seconds: 1000
, minutes: 60 * 1000
, hours: 60 * 60 * 1000
, days: 24 * 60 * 60 * 1000
, weeks: 7 * 24 * 60 * 60 * 1000
, months: 30 * 7 * 24 * 60 * 60 * 1000
, years: 365 * 24 * 60 * 60 * 1000 }
@sergiolopes
sergiolopes / ios5webdebug.sh
Created March 2, 2012 21:47
Runs iOS 5 simulator with MobileSafari remote debug
#!/bin/bash
# Open iPhone Simulator on default location for XCode 4.3
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
# Open mobile safari
echo Open mobile safari on emulator and press return
read
# Plug debug to MobileSafari.app
@SlexAxton
SlexAxton / .zshrc
Last active April 25, 2023 03:57
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@luk-
luk- / repourl.sh
Created March 5, 2013 04:26
view repo url and copy to clipboard
function repourl () { npm view $1 repository.url | tee >(pbcopy) ; }
@machty
machty / new-router-examples.md
Last active April 16, 2020 22:03
How to do cool stuff with the new Router API
@ebidel
ebidel / Web Components Resources.md
Last active February 27, 2023 22:04
List of resources related to Web Components
@WebReflection
WebReflection / typeOf.js
Last active February 15, 2016 16:12
An incrementally improved approach to a common JavaScript function/utility widely adopted all over. Returns the lowercase type or [[Class]] of a generic variable.
var typeOf = (function(Object, RegExp){
// WTFPL License - http://en.wikipedia.org/wiki/WTFPL
// thanks to @jdalton and @ljharb
var toString = Object.prototype.toString,
cache = (Object.create || Object)(null);
return function typeOf(Unknown) {
var asString = typeof Unknown;
return asString == 'object' ? (
Unknown === null ? 'null' : (
cache[asString = toString.call(Unknown)] || (
@jvns
jvns / interview-questions.md
Last active May 14, 2024 18:47
A list of questions you could ask while interviewing

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".