Skip to content

Instantly share code, notes, and snippets.

@miccheng
miccheng / gist:8253012
Last active January 2, 2016 04:49
Software i use.

#Software#

##Downloads##

  • Java Runtime
  • Chrome
  • Firefox
  • Dropbox
  • Google Drive
  • PHPStorm
  • Alfred v2
@aikchun
aikchun / .vim
Last active December 29, 2015 21:19
vimrc
let mapleader=","
" load plugins
execute pathogen#infect()
let g:EasyMotion_leader_key = '<Leader>'
map <F2> :NERDTreeToggle<CR>
let NERDTreeShowLineNumbers=1
let NERDTreeShowHidden=1
" General configuration
@simkimsia
simkimsia / toc_for_lab1.md
Created November 27, 2013 07:03
the TOC for the nov 27 2013 workshop at hackerspace SG on vagrant + virtualbox + phpunit
var app = angular.module('validationExample', []);
app.controller('signupController', ['$scope', function($scope) {
$scope.submitted = false;
$scope.signupForm = function() {
if ($scope.signup_form.$valid) {
} else {
$scope.signup_form.submitted = true;
}
@tmcw
tmcw / d3.md
Last active December 6, 2022 14:04
Accompaniment to dcjq

This is a more wordy, narrative accompaniment to my pretty bare presentation about d3 that I gave to the jQuery DC Meetup.

What is d3?

  • Not a chart library (though you can make charts with it)
  • Not a map library (though you can make maps with it)

Which is to say, d3 can be used for building things, but the 'atomic parts' are lower-level than bar graphs or projections or so on. This is a powerful fact. It also means that d3 is a good basis for simple interfaces, like Vega.js, that make its power accessible in other ways.

  • Not a compatibility layer (it doesn't work with bad browsers)
@JaceTan
JaceTan / PasswordEmail.php
Last active December 15, 2015 20:09
The ultimate forget_password pieces
<?php
//add this file to Lib/Email folder
App::uses('CakeEmail', 'Network/Email');
class PasswordEmail {
private $emailConfig = 'gmail';
private $sender = '[email protected]';
private $from;
@mattmcc
mattmcc / models.py
Created March 27, 2013 00:24
Quick & dirty "read-only" model for using SQL views
class ViewManager(models.Manager):
def bulk_create(self, *args, **kwargs):
raise NotImplementedError
def create(self, *args, **kwargs):
raise NotImplementedError
def get_or_create(self, *args, **kwargs):
raise NotImplementedError
@ruiwen
ruiwen / fb-angular.js
Last active July 5, 2017 10:40
Wrapping and initialising the Facebook SDK with Angular JS
// Facebook SDK
angular.module('facebook', [])
.directive('fb', ['$FB', function($FB) {
return {
restrict: "E",
replace: true,
template: "<div id='fb-root'></div>",
compile: function(tElem, tAttrs) {
return {
post: function(scope, iElem, iAttrs, controller) {
@gdamjan
gdamjan / README.md
Last active April 5, 2025 23:28
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.

What

A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).

Requirements

@notthetup
notthetup / HipsterSG.md
Last active December 11, 2015 09:08
List of hipster places to hangout in Singapore.