Skip to content

Instantly share code, notes, and snippets.

View brian-lc's full-sized avatar

Brian Chamberlain brian-lc

View GitHub Profile
@ernstki
ernstki / browser
Last active August 30, 2023 14:42
Pipe into a browser, or a previewer like Quick Look (macOS and Linux)
#!/usr/bin/env bash
##
## pipe into a browser or a previewer like Quick Look on Mac or Linux
##
## Authors: Kevin Ernst <ernstki -at- mail.uc.edu>
## Geoff Nixon <geoff -at- geoffnixon.net>
## Date: 24 September 2022
## See also: https://gist.github.com/defunkt/318247#gistcomment-1196817
##
@staltz
staltz / introrx.md
Last active September 24, 2024 06:42
The introduction to Reactive Programming you've been missing
@soheilhy
soheilhy / nginxproxy.md
Last active September 19, 2024 06:16
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@cobbr2
cobbr2 / ruote fancy_log
Last active September 28, 2017 22:31
Ruote "fancy_logging" code table
The abbreviation of an action is the same as its first two letters, *except* for a few that are ambiguous otherwise:
ap | apply
ca | cancel cancel_process
ce | ceased
dc | dispatch_cancel
dd | dispatched
di | dispatch
dp | dispatch_pause
dr | dispatch_resume
@rxaviers
rxaviers / gist:7360908
Last active September 24, 2024 02:38
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@brian-lc
brian-lc / .vimrc
Created May 9, 2011 17:02
my .vimrc
set nocompatible
set backspace=indent,eol,start
set directory^=$HOME/.vim_swap// "put all swap files together in one place
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
@stellaraccident
stellaraccident / control-block-http-example1.js
Created March 21, 2011 20:05
Bulletproof node coding snippets
request: function(options) {
var future=new Future();
var req=http.request(options, function(res) {
var text='';
res.setEncoding('utf8');
res.on('data', function(chunk) {
text+=chunk;
});
res.on('end', Block.guard(function() {
(installed gems list below)
yitzhakbg@ybguntu:~/Projects$ rails -v
Rails 2.3.8
yitzhakbg@ybguntu:~/Projects$ rails nsurv
create
create app/controllers
create app/helpers
create app/models
create app/views/layouts
create config/environments
@davisp
davisp / couch-node.ini
Created November 5, 2010 23:45
Configuring CouchDB (trunk) to have a node.js handler.
; Just drop this in /etc/couchdb/local.d/ and then
; start CouchDB normally.
; Here couch_node can be anything as long as it's uniq.
[os_daemons]
couch_node = /Users/davisp/tmp/couch-node.js
@shripadk
shripadk / gist:652819
Created October 29, 2010 03:10
Express authentication using Redis for session store and Couchdb for database (in coffeescript!)
###
Module dependencies
###
require.paths.unshift "#{__dirname}/lib/support/express-csrf/"
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/"
express = require 'express'
app = module.exports = express.createServer()
RedisStore = require 'connect-redis'