Skip to content

Instantly share code, notes, and snippets.

View novelistparty's full-sized avatar

novelistparty novelistparty

View GitHub Profile
@killercup
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
@aras-p
aras-p / preprocessor_fun.h
Last active July 16, 2024 02:50
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
# Download the file manually from here https://launchpad.net/gcc-arm-embedded
# Note: `curl` command doesn't work
# I downloaded this one: "gcc-arm-none-eabi-4_7-2013q3-20130916-mac.tar.bz2"
# double click it to unzip it
# Make a place to install it to
mkdir /usr/local/gcc_arm
# Move the unzipped stuff there.
@alan-mushi
alan-mushi / fields_magic.c
Created July 29, 2014 10:05
Simple ncurses form example with fields that actually behaves like fields
/*
* Simple ncurses form example with fields that actually behaves like fields.
*
* How to run:
* gcc -Wall -Werror -g -pedantic -o test fields_magic.c -lform -lncurses
*/
#include <ncurses/ncurses.h>
#include <ncurses/form.h>
#include <assert.h>
#include <string.h>
@devgru
devgru / canvas.js
Last active January 4, 2021 16:42
High DPI Canvas (Retina support)
var width = 500,
height = 70,
font = '18px serif'
function getRetinaRatio() {
var devicePixelRatio = window.devicePixelRatio || 1
var c = document.createElement('canvas').getContext('2d')
var backingStoreRatio = [
c.webkitBackingStorePixelRatio,
c.mozBackingStorePixelRatio,
@Zulko
Zulko / cubes_pyode_vapory.py
Last active December 27, 2023 12:29
3D cubes animation with PyODE and Vapory
"""
Physics simulation with PyODE followed by a (basic) rendering with Vapory
See the result here: http://i.imgur.com/TdhxwGz.gifv
Zulko 2014
This script is placed in the Public Domain (Licence Creative Commons 0)
"""
@framkant
framkant / gist:6daed7f6145af958f0bc
Created December 7, 2014 09:55
A C99 version (needed for my own purposes)
// -------------------------------------------------------------------------------
// CoreAudio continuous play test
// (c) 2014 by Arthur Langereis (@zenmumbler)
// created: 2014-12-07
//
// As part of my efforts for stardazed and to create a Mac OS X version of
// Handmade Hero.
//
// compile with:
// clang++ -std=c++11 -stdlib=libc++ -framework AudioToolbox catest.cpp -o catest
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@ttscoff
ttscoff / dontforget.bash
Last active June 12, 2024 21:04
Quick reminders from Terminal (bash)
#!/bin/bash
# dontforget
#
# A stupid script for short term reminders in bash
#
# Arguments just need to contain a number and a bunch of words.
#
# The number can be anywhere in the arguments, but there shouldn't
# be any other numeric digits.
#
@Reedbeta
Reedbeta / cool-game-programming-blogs.opml
Last active May 5, 2024 18:07
List of cool blogs on game programming, graphics, theoretical physics, and other random stuff
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Graphics, Games, Programming, and Physics Blogs</title>
</head>
<body>
<outline text="Tech News" title="Tech News">
<outline type="rss" text="Ars Technica" title="Ars Technica" xmlUrl="http://feeds.arstechnica.com/arstechnica/index/" htmlUrl="https://arstechnica.com"/>
<outline type="rss" text="Polygon - Full" title="Polygon - Full" xmlUrl="http://www.polygon.com/rss/index.xml" htmlUrl="https://www.polygon.com/"/>
<outline type="rss" text="Road to VR" title="Road to VR" xmlUrl="http://www.roadtovr.com/feed" htmlUrl="https://www.roadtovr.com"/>