Skip to content

Instantly share code, notes, and snippets.

View darfink's full-sized avatar
🛠️
Oxidizing

Elliott Linder darfink

🛠️
Oxidizing
View GitHub Profile
const unsigned short gBackgroundBitmap[25516] __attribute__((aligned(4))) = {
0x30, 0x00, 0xB0, 0x04, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70,
0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70,
0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70,
0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70,
0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70,
0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70,
0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70,
0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70,
0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70, 0xFF, 0x70,
This file has been truncated, but you can view the full file.
//{{BLOCK(background_1060405_640)
//======================================================================
//
// background_1060405_640, 640x480@8,
// + 4800 tiles not compressed
// Total size: 307200 = 307200
//
// Time-stamp: 2017-04-24, 15:12:43
@darfink
darfink / bg.h
Created April 24, 2017 13:56
Background
This file has been truncated, but you can view the full file.
/* GIMP header image file format (RGB): /Users/atomen/Downloads/background-1060405_640.h */
static unsigned int width = 640;
static unsigned int height = 480;
/* Call this macro repeatedly. After each use, the pixel data can be extracted */
#define HEADER_PIXEL(data,pixel) {\
pixel[0] = (((data[0] - 33) << 2) | ((data[1] - 33) >> 4)); \
pixel[1] = ((((data[1] - 33) & 0xF) << 4) | ((data[2] - 33) >> 2)); \
@darfink
darfink / ffi.rs
Created November 21, 2016 09:46
Example binding generated from ChakraCore
// automatically generated by rust-bindgen
pub type ChakraCookie = usize;
pub type ChakraBytePtr = *mut libc::c_uchar;
pub type BYTE = libc::c_uchar;
pub type byte = BYTE;
#[repr(u32)]
/// <summary>
/// An error code returned from a Chakra hosting API.
/// </summary>
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications with XML.</description>
</book>
function eventSourceTest() {
header("Content-Type: text/event-stream\n\n");
$counter = rand(1, 10);
echo "Bajs $counter eaaa";
while (1) {
// Every second, sent a "ping" event.
echo "event: ping\n";
$curDate = @date(DATE_ISO8601);
if has('unix')
set backupdir=~/.vim/backup
set backupskip=/tmp/*,/private/tmp/*
set directory=~/.vim/tmp
set undodir=~/.vim/undodir
elseif has('win32')
set backupdir=$HOME/AppData/Local/backup
set directory=$HOME/AppData/Local/tmp
set undodir=$HOME/AppData/Local/undo
endif
// Generated by CoffeeScript 1.3.3
(function() {
var Instafeed, root;
Instafeed = (function() {
function Instafeed(params, context) {
var option, value;
this.options = {
target: 'instafeed',