Skip to content

Instantly share code, notes, and snippets.

View 0xqd's full-sized avatar
🚀
Buidl web3

jn 0xqd

🚀
Buidl web3
View GitHub Profile
@0xqd
0xqd / default.vcl
Created October 1, 2013 09:45 — forked from gondo/default.vcl
# file /etc/varnish/default.vcl
# This is a basic VCL configuration file for varnish. See the vcl(7)
# man page for details on VCL syntax and semantics.
#
# Default backend definition. Set this to point to your content
# server.
#
#backend default {
# .host = "127.0.0.1";
module Deletable
extend ActiveSupport::Concern
included do
define_model_callbacks :soft_delete
define_model_callbacks :revive
default_scope { where(:deleted_at => nil) }
class_eval do
class << self
alias_method :with_deleted, :unscoped
@0xqd
0xqd / .editorconfig
Last active December 23, 2015 11:29 — forked from josephj/.editorconfig
root = true
[*]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
quote_type = double
spaces_around_operators = true
space_after_control_statements = true
@0xqd
0xqd / cap.rb
Created September 4, 2013 08:59 — forked from kix/cap.rb
http://www.dizzy.co.uk/cheatsheets
This work is licensed under the Creative Commons
Attribution-NonCommercial-NoDerivs 2.0 License. To
view a copy of this license, visit
http://creativecommons.org/licenses/by-nc-nd/2.0/uk
########## Shell Commands ##########
Installation:
$ gem install capistrano
===========================================================
PATHS
===========================================================
# Make sure /usr/local/bin is at top
sudo nano /etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

Installation commands:

$ wget http://redis.googlecode.com/files/redis-2.4.8.tar.gz
$ tar xvfz redis-2.4.8.tar.gz 
$ cd redis-2.4.8/
$ mkdir -p /opt/redis
$ make PREFIX=/opt/redis install
$ cp redis.conf /opt/redis/redis.conf
$ chown -R redis:redis /opt/redis
@0xqd
0xqd / dabblet.css
Created September 4, 2012 06:50 — forked from vasilisvg/dabblet.css
Standard html5 form
/**
* Resultaat oefening 2.2b HTML5 forms
*/
label {
display: block
}
:invalid {
background: #ffdddd;
@0xqd
0xqd / _html5boilerplate.css.sass
Created August 31, 2012 08:30 — forked from richardvenneman/_html5boilerplate.css.sass
HTML5 Boilerplate HAML & SASS
/*
* HTML5 ✰ Boilerplate
*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*
* Detailed information about this CSS: h5bp.com/css
*
* ==|== normalize ==========================================================
@0xqd
0xqd / package.json
Created August 30, 2012 13:53 — forked from gquental/package.json
Nodejs - Package.json
{
"name": "app-name",
"version": "0.1.0",
"author": "nXqd",
"description": "app-description",
"dependencies": {
"request": "*",
"connect": "*"
},
"engines": {
@0xqd
0xqd / ruby-memoization.rb
Created August 26, 2012 19:20 — forked from rfelix/gist:79500
Ruby Self-Modification Example - Memoize
require 'benchmark'
class Fib
def fib(n)
return n if n < 2
return fib(n-1) + fib(n-2)
end
end
def memoize(className, methodName)