Skip to content

Instantly share code, notes, and snippets.

@deanrad
deanrad / seed_users.js
Last active August 29, 2015 14:06
Create a bunch of new users in Meteor
if(Meteor.isServer){
_.each(["Angelo Paramo",
"Demarcus Drouin",
"Suzie Magwood",
"Caron Wilcoxo",
"Orville Manns",
"Tashia Taber",
"Nickie Buchman",
"Scotty Monette",
"Clare Murillo",
@jbinto
jbinto / howto-recover-google-authenticator-keys.txt
Created February 8, 2014 04:20
Recovering Google Authenticator keys from Android device for backup
### Last tested February 7 2014 on a Galaxy S3 (d2att) running Cyanogenmod 11 nightly, with Google Authenticator 2.49.
### Device with Google Authenticator must have root.
### Computer requires Android Developer Tools and SQLite 3.
### Connect your device in USB debugging mode.
$ cd /tmp
$ adb root
$ adb pull /data/data/com.google.android.apps.authenticator2/databases/databases
@gabrielhpugliese
gabrielhpugliese / meteor-windows-vagrant-tutorial.md
Last active April 19, 2022 14:37
Tutorial for running Meteor in Windows using Vagrant

Tutorial: Meteor in Windows using Vagrant

BEFORE YOU CONTINUE:

  • Now, Meteor runs in any Windows without any line of this tutorial. Just download the Meteor binary! Yay!!
  • mrt is no longer used with Meteor 1.0

These days some people were discussing at meteor-talk group about running Meteor at Windows and I’ve recommended them using Vagrant. It’s a very developer-friendly piece of software that creates a virtual machine (VM) which let you run any operating system wanted and connect to it without big efforts of configuration (just make the initial installation and you have it working).

Many packages (I've tested) for running Meteor+Vagrant fails because Meteor writes its mongodb file and also other files inside local build folder into a shared folder between the Windows host and the Linux guest, and it simply does not work. So I've put my brain to work and found a solution: do symlinks inside the VM (but do not use ln. Use mount so git can follow it). It’s covered on

@willurd
willurd / web-servers.md
Last active May 25, 2024 13:16
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@jeremeamia
jeremeamia / .ebextensions_auth.config
Last active December 10, 2015 23:19
Funny face sharing Silex app using Amazon S3 and Amazon DynamoDB for a presentation at the Seattle PHP Meetup group (<http://joind.in/8035>). This app is meant to be run on an AWS Elastic Beanstalk stack. The contents of the assets folder are excluded, but it mainly contained the Twitter Bootstrap CSS and JavaScript code.
Resources:
AWSEBAutoScalingLaunchConfiguration:
Properties:
IamInstanceProfile: arn:aws:iam::123456789012:instance-profile/demo
@meonkeys
meonkeys / skype-notify.py
Created August 22, 2012 17:26 — forked from nzjrs/skype-notify.py
Python script to make Skype co-operate with GNOME3 notifications
#!/usr/bin/env python
# Python script to make Skype co-operate with GNOME3 notifications.
#
#
# Copyright (c) 2011, John Stowers
#
# Adapted from skype-notify.py
# Copyright (c) 2009, Lightbreeze
#
#
@robcowie
robcowie / print_github.js
Created June 15, 2012 16:25
Github print styling bookmarlet
javascript:(function(e,a,g,h,f,c,b,d)%7Bif(!(f=e.jQuery)%7C%7Cg%3Ef.fn.jquery%7C%7Ch(f))%7Bc=a.createElement(%22script%22);c.type=%22text/javascript%22;c.src=%22http://ajax.googleapis.com/ajax/libs/jquery/%22+g+%22/jquery.min.js%22;c.onload=c.onreadystatechange=function()%7Bif(!b&&(!(d=this.readyState)%7C%7Cd==%22loaded%22%7C%7Cd==%22complete%22))%7Bh((f=e.jQuery).noConflict(1),b=1);f(c).remove()%7D%7D;a.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,%221.3.2%22,function($,L)%7B$('%23header,%20.pagehead,%20.breadcrumb,%20.commit,%20.meta,%20%23footer,%20%23footer-push').remove();%20$('%23files,%20.file').css(%7B%22background%22:%22none%22,%20%22border%22:%22none%22%7D);%20$('link').removeAttr('media');%7D);
@MattKetmo
MattKetmo / FacebookSessionPersistence.php
Created May 25, 2012 08:10
Quick (and dirty) fix for running tests using FosFacebookBundle
<?php
namespace Foo\BarBundle\Facebook;
use FOS\FacebookBundle\Facebook\FacebookSessionPersistence as BaseFacebookSessionPersistence;
use Symfony\Component\HttpFoundation\Session\Session;
/**
* Quick (and dirty) fix for running tests using FosFacebookBundle.
* It may have unwanted consequences (not tested)!
@ex-nerd
ex-nerd / tutorial1.rst
Created March 11, 2012 10:01
Yet Another (corporate) Git Workflow Recommendation

Yet Another (corporate) Git Workflow Recommendation

I noticed myself passing around similar copies of the same git description to friends and coworkers enough times that I finally decided to write it up for a wider audience, though mostly so I would only have to do it one last time.

First off, this recommendation is for novice git users, particularly those who are coming from a CVS or Subversion background.

This workflow is based on the Branching workflow described in the Pro Git book (which I recommend that you find some time to read). In my experience, I've found that the distributed model just doesn't make sense in a corporate environment where people want there to be a single canonical origin repository.

*This is a work in progress. It's currently divided up into two sections, one describing what I hope is an easy walkthrough of recommended workflows, the other delving into much more detail about how git allows you to some of the more interes

@nzjrs
nzjrs / skype-notify.py
Created June 3, 2011 13:14
Python script to make Skype co-operate with GNOME3 notifications
#!/usr/bin/env python
# Python script to make Skype co-operate with GNOME3 notifications.
#
#
# Copyright (c) 2011, John Stowers
#
# Adapted from skype-notify.py
# Copyright (c) 2009, Lightbreeze
#
#