Skip to content

Instantly share code, notes, and snippets.

@m9dfukc
m9dfukc / .block
Created April 18, 2018 11:38 — forked from enjalot/.block
Quick, Draw! d3 & SVG demo
license: mit
@m9dfukc
m9dfukc / 1-server.md
Created March 29, 2016 09:33 — forked from dragonjet/1-server.md
Setup Web Server on EC2 Amazon Linux AMI

Step 1: Server Credentials

This assumes you are now connected to the server via SSH.

  • sudo -s Enter root mode for admin access
  • groupadd devgroup Create new group to be later granted access to /var/www/html

Creating a new Root User

  • useradd -G root,devgroup masterdev Create new root user. Also add to the devgroup
  • passwd masterdev Change password for the new root user
  • At this point, you'll need to input your new root user's new password
@m9dfukc
m9dfukc / sessionStorage.js
Created December 2, 2012 09:08 — forked from tagawa/sessionStorage.js
sessionStorage polyfill
/*
* Based on: http://www.quirksmode.org/js/cookies.html
* and https://github.com/wojodesign/local-storage-js/blob/master/storage.js
* and https://gist.github.com/350433
* License: http://www.opensource.org/licenses/MIT
*/
(function(window) {
'use strict';
window.sessionStorage = window.sessionStorage || {
@m9dfukc
m9dfukc / gist:3363520
Created August 15, 2012 20:49 — forked from streunerlein/gist:3332181
NPM Mirrors & Proxies

Definition

Mirrors: standalone servers with complete copy of npm registry

Proxies: proxy to the database (couchdb) of npm registry, if only the npm registry server fails but the db works

## HowTo See this gist: https://gist.github.com/3331671

Mirrors

(+) means server is self updating (pulls newest stuff from offical registry when back online again)

@m9dfukc
m9dfukc / _schema.rb
Created August 10, 2012 08:17 — forked from RyanScottLewis/_schema.rb
SpineJS User's Name helper + showing off getters/setters in Spine
ActiveRecord::Schema.define(:version => 00000000000000) do
create_table "users", :force => true do |t|
t.string "username", :default => "", :null => false
t.string "email", :default => "", :null => false
t.string "encrypted_password", :default => "", :null => false
# Devise fluff here...
t.string "first_name", :default => "", :null => false