Instantly share code, notes, and snippets.

View hiptext.rb
require "formula"
class Hiptext < Formula
homepage ""
head "", :branch => "master"
depends_on "pkg-config" => :build
depends_on "ragel" => :build
# depends_on :libpng
depends_on "jpeg"
View unreal engine 4 intro notes
Learn tab in launcher, free examples.
moving camera:
l+r at same time
Hold right, + wasd+qe move camera
fog: quickest way to get a basic background
light: atmosphere option -> sun
View heroku.js
// curl -H "Accept: application/vnd.heroku+json; version=3"
"$schema": "",
"definitions": {
"account-feature": {
"description": "An account feature represents a Heroku labs capability that can be enabled or disabled for an account on Heroku.",
"$schema": "",
"stability": "production",
"strictProperties": true,
"title": "Heroku Platform API - Account Feature",
View ya3dd2.bas
'-----------< Yet Another 3D Demo/Engine v2.0 >---------
'By Dennis Hotson (
'* Use the mouse to look around
'* Use arrow keys OR "WASD" to move/strafe
'* Use the - and + keys to move up/down
'* Click left mouse button to rotate cube
'* Click right mouse button to rotate square
View ErrorHandler.php
namespace Bugsnag;
class ErrorHandler
View hhvm.diff
diff --git a/lib/Pheasant/Database/Mysqli/ResultIterator.php b/lib/Pheasant/Database/Mysqli/ResultIterator.php
index 17efd64..dbcd755 100755
--- a/lib/Pheasant/Database/Mysqli/ResultIterator.php
+++ b/lib/Pheasant/Database/Mysqli/ResultIterator.php
@@ -5,7 +5,7 @@ namespace Pheasant\Database\Mysqli;
class ResultIterator implements \SeekableIterator, \Countable
private $_result;
- private $_position;
+ private $_position = 0;
View BeanstalkDriver.php
namespace Bernard\Driver;
class BeanstalkDriver implements \Bernard\Driver
from __future__ import division
from math import *
from random import random, gauss
def p_smooth(c, n):
return (c + 1) / (n + 2)
def binomial(c, n):
p = p_smooth(c, n)
return 2*sqrt((1/n if n > 0 else 1) * p * (1-p))
View shotgun.php
// Find files of all classes loaded..
$loader = require('vendor/autoload.php');
$files = array_filter(array_map(function($c) use ($loader) {
return $loader->findfile($c);
}, get_declared_classes()));
// Better solution.. find all required files
array_map(function($f) use ($i) {