This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Delimited continuations | |
#lang racket ; but will work in any Scheme (without this line) | |
;; There are other implementations along the same lines floating around. | |
;; Here we are trying to paint a more comprehensible (or at least a less | |
;; incomprehensible) picture by structuring the implementation as three | |
;; distinct layers: | |
;; Layer 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# some variables | |
POSTCSS = ./node_modules/.bin/postcss | |
POSTCSS_FLAGS = --use autoprefixer autoprefixer.browsers "> 2%" | |
# wildcard expansion is performed only in targets and in prerequisites so here we need $(wildcard) | |
SOURCES = $(wildcard src/css/*.css) | |
# use $(SOURCES) to determine what we actually need using a bit of pattern substitution | |
TARGETS = $(patsubst src%, build%, $(SOURCES)) | |
# our default target (see below) | |
all: $(TARGETS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Output Directory | |
OUTPUT = ../lib | |
all: css html js | |
css: | |
@echo "stylus => css" | |
@stylus \ | |
-c \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Output Directory | |
OUTPUT = ../lib | |
all: css | |
css: | |
@echo "stylus => css" | |
@stylus \ | |
-c \ | |
-u nib \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Makefile for transpiling with Babel in a Node app, or in a client- or | |
# server-side shared library. | |
.PHONY: all clean | |
# Install `babel-cli` in a project to get the transpiler. | |
babel := node_modules/.bin/babel | |
# Identify modules to be transpiled by recursively searching the `src/` | |
# directory. |
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
if (!document.elementsFromPoint) { | |
document.elementsFromPoint = elementsFromPoint; | |
} | |
function elementsFromPoint(x, y) { | |
var parents = []; | |
var parent = void 0; | |
do { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// vim: ft=javascript: | |
/*jslint sloppy: true, vars: true, white: true, nomen: true, browser: true */ | |
/*global SpreadsheetApp, UiApp, UrlFetchApp, Utilities */ | |
/* | |
* A script to automate requesting data from an external url that outputs CSV data. | |
* | |
* Adapted from the Google Analytics Report Automation (magic) script. | |
* @author [email protected] (Nick Mihailovski) | |
* @author [email protected] (Ian Lewis) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream zwm_app { | |
# Path to Unicorn SOCK file, as defined previously | |
server unix:/home/rails/zwm/shared/sockets/unicorn.sock fail_timeout=0; | |
} | |
server { | |
listen 443 ssl http2; | |
server_name zwm.org.in; | |
ssl_certificate /etc/nginx/ssl/nginx.crt; | |
ssl_certificate_key /etc/nginx/ssl/nginx.key; |
NewerOlder