Skip to content

Instantly share code, notes, and snippets.

georgenaranjo96 /
Created Oct 16, 2020 — forked from Surendrajat/
elementaryOS | Things I Do After Installing elementary OS Hera

First Things First

  • Enable PPA

     sudo apt update
     sudo apt install software-properties-common apt-transport-https curl
  • Install apt-fast [Yes! it's really fast]

Couto / webpack.js
Last active Jul 3, 2020
Fetch polyfill with webpack
View webpack.js
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var path = require('path');
var folders = {
APP: path.resolve(__dirname, '../app'),
BUILD: path.resolve(__dirname, '../build'),
BOWER: path.resolve(__dirname, '../bower_components'),
NPM: path.resolve(__dirname, '../node_modules')
malarkey / Contract Killer
Last active Oct 24, 2020
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

addyosmani /
Created Oct 28, 2011
Four ways to do Pub/Sub with jQuery 1.7 and jQuery UI (in the future)

#Four Ways To Do Pub/Sub With jQuery and jQuery UI (in the future)

Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.

(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here

##Option 1: Using jQuery 1.7's $.Callbacks() feature:

$.Callbacks are a multi-purpose callbacks list object which can be used as a base layer to build new functionality including simple publish/subscribe systems. We haven't yet released the API documentation for this feature just yet, but for more information on it (including lots of examples), see my post on $.Callbacks() here:

dhrrgn / csrf.php
Created Oct 23, 2011
Simple, yet effective CSRF class for FuelPHP.
View csrf.php
* Simple, yet effective CSRF class for FuelPHP.
* @author Dan Horrigan
* @license MIT License
* @copyright 2011 Dan Horrigan
wbailey / databases.rake
Created Feb 11, 2011
ActiveRecord migrations outside of Rails
View databases.rake
require 'yaml'
require 'logger'
require 'active_record'
namespace :db do
def create_database config
options = {:charset => 'utf8', :collation => 'utf8_unicode_ci'}
create_db = lambda do |config|
ActiveRecord::Base.establish_connection config.merge('database' => nil)
octplane / mongo_pubsub.rb
Created Nov 9, 2010
Simple Pub/Sub system using MongoDB, capped collections and tailable cursors in ruby
View mongo_pubsub.rb
require 'rubygems'
require 'mongo'
module MongoPubSub
class EndSubscriptionException < Exception; end
class Publisher
def initialize(queue_name, mongo_connection)
# Initialize queue collection as a capped collection
if not mongo_connection[QUEUES_COLLECTION].collection_names.include?(queue_name)
You can’t perform that action at this time.