Skip to content

Instantly share code, notes, and snippets.

View irae's full-sized avatar

Irae Carvalho irae

View GitHub Profile
@branneman
branneman / better-nodejs-require-paths.md
Last active April 8, 2024 00:22
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@gnarf
gnarf / ..git-pr.md
Last active April 12, 2024 22:00
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

FrontCalendar

Na falta de um site decente e realmente atualizado com os eventos de front-end que vão rolar, dê um pulo aqui ;)

Finalmente temos um site decente para listar os eventos, por isso a partir de agora essa lista não será mais atualizada e todos os esforços estarão concentrados na página de Eventos do BrazilJS.

@dsanson
dsanson / any2pandoc.sh
Created August 30, 2011 17:52
any2pandoc.sh: script that tries to convert documents thrown at it to pandoc's extended markdown
#!/bin/sh
# any2pandoc.sh
#
# A shell script that tries its best to convert documents thrown at it
# to pandoc's extended markdown.
#
# https://gist.github.com/1181510
#
# Depends on:
@msmith
msmith / couchdb-ec2-install.sh
Created August 25, 2011 17:26
Set up CouchDB on EC2
#!/bin/bash
#
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance.
#
# Must be run with root privileges
# Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5)
#
export BUILD_DIR="$PWD"
@WebReflection
WebReflection / fake-script.js
Created August 24, 2011 19:03
hot to mock script requests
document.createElement = function (
createElement, // the native one
createResponse // the function "in charge"
) {
return function (nodeName) {
var result, src;
// if we are creating a script
if (/^script$/i.test(nodeName)) {
// result will be a place holder
result = createElement.call(
@paulirish
paulirish / 0readme.md
Created August 22, 2011 05:26
For converting adium logs to decently sexy HTML

adium log export to HTML

this shit is for exporting this weirdass xml out into some sane HTML.

  • run rename.sh to kill the whitespaces in your xml filenames
    • alternatively fix my htmlify.sh to not break on whitespace'd filenames
      • UPDATE: check this comment on a quick fix to avoid this rename script. BOOM! thx @kwef!
  • run htmlify.sh
    • htmlify has a hardcoded destination directory.
  • htmlify also expects the format-html.* files to be up one folder from it.
@jeffrafter
jeffrafter / ie6.sh
Created August 11, 2011 16:04
Setup a VirtualBox instance that allows you to test IE Locally from OSX
#!/bin/bash
# Much of this came from a few blog articles and one base script that I can't find now
# It is updated for the current VHD files (which supposedly expired on Aug 9th, 2011
# but still work.
#
# Requirements: Virtual Box installed, unrar (from homebrew is fine)
#
# If you want to remove stuff, open up Virtual Box and remove the VM and delete files.
#
@kylebarrow
kylebarrow / example.html
Created June 23, 2011 06:30
Prevent links in standalone web apps opening Mobile Safari
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>