Skip to content

Instantly share code, notes, and snippets.

@zachstronaut
zachstronaut / gist:1184900
Created August 31, 2011 22:22
Stretch HTML5 canvas to fill window, preserving aspect ratio
/**
* fullscreenify()
* Stretch canvas to size of window.
*
* Zachary Johnson
* http://www.zachstronaut.com/
*
* See also: https://gist.github.com/1178522
*/
@tjb0607
tjb0607 / visualizer.py
Last active December 26, 2021 19:24
a 2D audio visualizer script for Blender 2.5+ (v0.3)
# To use this script, you must first change a few things.
# First, you'll want to change the filepath for the sound file.
# This is on line 76. Second, you might want to change the materials or the settings.
# To render this, you'll need to set the background color, enable Only Render on the display window, and render it with OpenGL (it's much faster and most optimal for 2D renders.)
# LICENSE = wtfpl
# VERSION = 0.3
import bpy
def makeMaterial(name, diffuse, alpha):
@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@mbostock
mbostock / .block
Last active July 18, 2024 02:14
Gradient Along Stroke
license: gpl-3.0
@davispuh
davispuh / steam_console_params.txt
Last active July 20, 2024 16:55
Steam client parameters, consoles commands and variables
-480p - Run tenfoot in 480p rather than 1080p
-720p - Run tenfoot in 720p rather than 1080p
-accesscode -
-all_languages - show longest loc string from any language
-batterytestmode - rapidly cycle battery percentages for testing
-bigpicture - Start in Steam Big Picture mode
-blefw -
-cafeapplaunch - Launch apps in a cyber cafe context
-candidates - Show libjingle candidates for local connection as they are processed
-ccsyntax - Spew details about the localized strings we load
@jasonwhite
jasonwhite / joystick.c
Last active May 3, 2024 13:28
Reads joystick/gamepad events on Linux and displays them.
/**
* Author: Jason White
*
* Description:
* Reads joystick/gamepad events and displays them.
*
* Compile:
* gcc joystick.c -o joystick
*
* Run:
@bellbind
bellbind / app.html
Created May 20, 2015 07:23
[electron]Use electron as a Web Server
<!doctype html>
<html><head><script src="app.js"></script></head><body></body></html>
@haasn
haasn / about:config.md
Last active April 2, 2024 18:46
Firefox bullshit removal via about:config

Firefox bullshit removal

Updated: Just use qutebrowser (and disable javascript). The web is done for.

@NeoTheThird
NeoTheThird / godot.desktop
Created February 11, 2017 20:52
A .desktop file for the godot engine. Icon has to point to a logo file.
[Desktop Entry]
Name=Godot Engine
Comment=An open source game engine. Need i say more?
Exec=/bin/godot
Icon=.godot.jpeg
Terminal=false
Type=Application
StartupNotify=true
@lh3
lh3 / x86-simd.c
Created September 5, 2017 17:06
Get supported SIMD instruction sets (x86 only)
#include <stdio.h>
#define SIMD_SSE 0x1
#define SIMD_SSE2 0x2
#define SIMD_SSE3 0x4
#define SIMD_SSSE3 0x8
#define SIMD_SSE4_1 0x10
#define SIMD_SSE4_2 0x20
#define SIMD_AVX 0x40
#define SIMD_AVX2 0x80