Skip to content

Instantly share code, notes, and snippets.

Avatar
👾
Invading spaces

Nathan Friedly nfriedly

👾
Invading spaces
View GitHub Profile
@Recmo
Recmo / wasm.js
Last active Jun 1, 2017
WebAssembly compile and run example
View wasm.js
/* global WebAssembly */
import wast2wasm from 'wast2wasm';
// Run with: babel-node --expose-wasm ./wasm.js
const wast = `(module
(func $fac (param i32) (result i32)
get_local 0
i32.eqz
if i32
View essential-javascript-links.md
@jdxcode
jdxcode / boot.js
Last active Oct 24, 2018
zero-downtime node.js app runner
View boot.js
// This script will boot app.js with the number of workers
// specified in WORKER_COUNT.
//
// The master will respond to SIGHUP, which will trigger
// restarting all the workers and reloading the app.
var cluster = require('cluster');
var workerCount = process.env.WORKER_COUNT || 2;
// Defines what each worker needs to run
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active Oct 5, 2020
Jekyll & Liquid Cheatsheet
View jekyll-and-liquid.md

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

View gulpfile.js
var gulp = require('gulp');
var browserify = require('gulp-browserify');
var concat = require('gulp-concat');
var styl = require('gulp-styl');
var refresh = require('gulp-livereload');
var lr = require('tiny-lr');
var server = lr();
var paths = {
js: 'src/**/*.js',
@DamonOehlman
DamonOehlman / README.md
Last active Jun 18, 2020
General WebRTC tips and tricks collated over time
View README.md
@cobyism
cobyism / gh-pages-deploy.md
Last active Oct 20, 2020
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).
View gh-pages-deploy.md

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@malarkey
malarkey / Contract Killer 3.md
Last active Oct 20, 2020
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

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

@moklett
moklett / openconnect.md
Created Jul 24, 2012
OpenConnect VPN on Mac OS X
View openconnect.md

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
     brew install openconnect
    
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

You can’t perform that action at this time.