Skip to content

Instantly share code, notes, and snippets.

@KHN190
KHN190 / crt.html
Last active March 4, 2023 04:40
PICO-8 webgl CRT effect.
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>PICO-8 Cartridge</title>
<meta name="description" content="">
<STYLE TYPE="text/css">
<!--
@heldr
heldr / gulpfile.js
Last active August 26, 2020 12:24
Another way of splitting a gulpfile into multiple files
/*
Another way of splitting a gulpfile into multiple files based on:
http://macr.ae/article/splitting-gulpfile-multiple-files.html
https://github.com/gulpjs/gulp/blob/master/docs/recipes/split-tasks-across-multiple-files.md
*/
'use strict';
var gulp = require('gulp'),
plugins = require('gulp-load-plugins')(),
@kerrishotts
kerrishotts / FileManager.js
Last active September 21, 2022 10:14
Simple File API wrapper using Q.js. Same code as in http://github.com/photokandyStudios/YASMF-Next/blob/master/lib/yasmf/util/fileManager.js, except wrapped in a global function. The code below will add a FileManager object to `window`, if it is passed in (otherwise it will only return it). It can then be used as seen in this demo: http://jsbin.…
;(
function( Q, BaseObject, globalContext ) {
/**
* Defined by Q, actually, but defined here to make type handling nicer
* @typedef {{}} Promise
*/
var DEBUG = false;
/**
* Requests a quota from the file system
* @method _requestQuota
@kerrishotts
kerrishotts / gist:5061352
Created March 1, 2013 00:15
Tired of dealing with trying to get bold and/or italicized fonts out of iOS given only the font name? This should help.
// UIFont+Utility.h
// UIFont+Utility.[h|m] is (C) Kerri Shotts 2013, and released under an MIT license.
#import <UIKit/UIKit.h>
/**
*
* PKFontNormal = no modifications to the font; i.e., -Regular, -Roman, -Book, etc.
* PKFontBold = bold font desired (if possible); i.e., -Bold, -Black, -Heavy, etc.
* PKFontItalic = italic font desired (if possible); i.e., -Italic, -Oblique, etc.
@kerrishotts
kerrishotts / UIBarButtonItem+Utility.h
Created February 18, 2013 20:13
UIBarButtonItem Utility: Quick & Dirty bar button item creation using Font Awesome, Text Attributes, and Background images.
// Author: Kerri Shotts
// MIT LIcense
#import <UIKit/UIKit.h>
@interface UIBarButtonItem (Utility)
+(UIBarButtonItem *) barButtonItemUsingFontAwesomeIcon: (NSString *)iconKey
target: (id)theTarget
action: (SEL)theAction
anonymous
anonymous / gist:4410510
Created December 30, 2012 01:54
Fade Splash Screen for iOS
// based on and inspired by https://gist.github.com/1026439 and https://gist.github.com/3798781
//
// MIT license. Use however you'd like.
//
// first, define our macro for delaying our transition:
#define PKWaitDelay(dly, block) dispatch_after(dispatch_time(DISPATCH_TIME_NOW,dly*100000),dispatch_get_current_queue(), ^{ block })
// then, inside your AppDelegate.m in didFinishLaunchingWithOptions:
UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.window.frame];
@kerrishotts
kerrishotts / PKSOAP.js
Last active June 14, 2016 16:15
Simple SOAP library for JavaScript (PhoneGap Compatible), v0.1
/*jshint asi:true, forin:true, noarg:true, noempty:true, eqeqeq:false, bitwise:true, undef:true, curly:true, browser:true, devel:true, smarttabs:true, maxerr:50 */
/******************************************************************************
*
* SOAP
* Author: Kerri Shotts
*
* This library includes simple SOAP functions. MIT license.
*
*
* Usage is pretty straightforward:
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active March 27, 2024 06:33
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx