Skip to content

Instantly share code, notes, and snippets.

View ellisonleao's full-sized avatar
👶
Taking care of a newborn

Ellison ellisonleao

👶
Taking care of a newborn
View GitHub Profile
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@mduheaume
mduheaume / .gitignore
Created January 28, 2012 17:12
Git ignore file for unity projects
Temp/
Library/
obj/
*.svd
!Library/*.asset
!Library/AssetImportState
!Library/AssetVersioning.db
!Library/BuildPlayer.prefs
!Library/ScriptMapper
@rantav
rantav / README.md
Created August 23, 2012 06:13
Find slow queries in mongo DB

A few show tricks to find slow queries in mongodb

Enable profiling

First, you have to enable profiling

> db.setProfilingLevel(1)

Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
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:

@rochacbruno
rochacbruno / local_settings.py
Last active June 22, 2024 09:53
Django Profiling Middleware with hotshot or Cprofile
MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + (
'yourapp.middleware.ProfileMiddleware',
'yourapp.middleware.CProfileMiddleware'
)
@rochacbruno
rochacbruno / south.py
Created August 5, 2013 14:11
adjust south to Django 1.5 custom user
from django.contrib.auth import get_user_model
User = get_user_model()
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm["%s.%s" % (User._meta.app_label, User._meta.object_name)])),
"%s.%s" % (User._meta.app_label, User._meta.module_name): {
'Meta': {'object_name': User.__name__},
},
@rafaelcaricio
rafaelcaricio / carta_a_presidente_dilma_rousseff.mkd
Last active December 25, 2015 14:19
Translation of the letter to President Dilma Rousseff from Maddog.

Olá, presidenta Rousseff... eu lhe avisei

Carta impressa: escrita por Maddog

Jon "maddog" Hall

Querida Presidenta Rousseff,

Eu entendo que a senhora esteja irritada com meu país, os Estados Unidos da América, porque uma de

@richardmcmillen-examtime
richardmcmillen-examtime / Repo
Last active January 29, 2022 00:10
Open a project file on GitHub.
#!/bin/bash
#
# Open the specified file on GitHub. It will use the master branch by default:
#
# repo -f app/controllers/application_controller.rb
#
# Specify a different branch:
#
# repo -b another-branch -f app/controllers/application_controller.rb
@pascalpoitras
pascalpoitras / config.md
Last active July 5, 2024 02:22
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@parasyte
parasyte / jay-inheritance.js
Last active July 3, 2019 19:55
Jay inheritance : A *really fast* implementation of JavaScript single inheritance with mixins and a little syntactic sugar to make it go down smoothly. http://blog.kodewerx.org/2014/03/melonjs-should-be-all-about-speed.html || DEPRECATED, See: https://github.com/parasyte/jay-extend
/*
* Copyright (c) 2014, Jay Oster
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,