Skip to content

Instantly share code, notes, and snippets.

@fenbf
fenbf / BasicParticles.cpp
Created April 27, 2014 05:47
Basic Particle classes design. Used as a starting point for my particle system. More details http://www.bfilipek.com
#include "particles.h"
#include <assert.h>
#include <algorithm>
namespace particles
{
void ParticleData::generate(size_t maxSize)
{
m_count = maxSize;
m_countAlive = 0;
anonymous
anonymous / peterspurepythonpicopdf.py
Created May 25, 2014 21:15
Peter's pure Python PicoPDF: Create a PDF in 100 lines of Python
from datetime import datetime
from zlib import compress
def serialize(x):
if isinstance(x, dict):
return '<<' + '\n'.join(serialize(k) + ' ' + serialize(v) for k, v in x.items()) + '>>'
if isinstance(x, list):
return '[' + ' '.join(serialize(it) for it in x) + ']'
return str(x)
@staltz
staltz / introrx.md
Last active May 20, 2024 14:59
The introduction to Reactive Programming you've been missing
using System;
namespace FortyOneShades
{
class Program
{
static int[] values = new int[]{
0x276AD9,
0x3E6FD9,
0x3A6FDE,
@morganrallen
morganrallen / _README.md
Last active January 15, 2023 19:41
Janky Browser

JankyBrowser

The only cross-platform browser that fits in a Gist!

One line install. Works on Linux, MacOSX and Windows.

Local Install

$&gt; npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
@jorinvo
jorinvo / challenge.md
Last active April 21, 2023 17:14
This is a little challenge to find out which tools programmers use to get their everyday tasks done quickly.

You got your hands on some data that was leaked from a social network and you want to help the poor people.

Luckily you know a government service to automatically block a list of credit cards.

The service is a little old school though and you have to upload a CSV file in the exact format. The upload fails if the CSV file contains invalid data.

The CSV files should have two columns, Name and Credit Card. Also, it must be named after the following pattern:

YYYYMMDD.csv.

@kconner
kconner / macOS Internals.md
Last active May 19, 2024 20:12
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options: