Skip to content

Instantly share code, notes, and snippets.

View pvamshi's full-sized avatar

Vamshi Krishna pvamshi

View GitHub Profile
@helpse
helpse / webpack.config.js
Created April 1, 2017 03:32
Webpack + dev server + hot reloading + pug + sass
var webpack = require('webpack');
var path = require('path');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var src = path.join(__dirname, 'src');
var config = {
devServer: {
hot: true,
@iandanforth
iandanforth / canvascapture.md
Last active October 5, 2022 10:57
Capture WebGL frames to disk

How to capture WebGL/Canvas by piping data over a websocket.

This Gist builds on https://gist.github.com/unconed/4370822 from @unconed.

Instead of the original method which writes to the browsers sandboxed filesystem here we use a websocket connection provided by websocketd to pipe image data to a short python script that writes out the .png files to disk.

Install websocketd

@justinabrahms
justinabrahms / colortest.py
Created June 26, 2011 17:10 — forked from graven/colortest.py
Small utility to test terminal support for 256-color output.
#!/usr/bin/env python
# Ported to Python from http://www.vim.org/scripts/script.php?script_id=1349
print "Color indexes should be drawn in bold text of the same color."
print
colored = [0] + [0x5f + 40 * n for n in range(0, 5)]
colored_palette = [
"%02x/%02x/%02x" % (r, g, b)
for r in colored