Skip to content

Instantly share code, notes, and snippets.

@twolfson
twolfson / .gitignore
Last active December 11, 2015 08:58
Proof of concept for ApiSubscriber model within Halo
node_modules
@twolfson
twolfson / README.md
Last active December 11, 2015 19:58
Ramblings on UI state (March/April 2012)

Preservation and accessibility of UI state

  • Should be able to change location from anywhere

    • Omni-present necessary for main nav, local nav, and any other relevant data
    • Make unique and RESTful
      • Yet order agnostic if possible?
  • Should be able to share between accounts but limited by user permissions

    • Hash works for this in accordance with omni-present state
  • Solution main controller changed via Sauron

  • State will be declared in global.js? (and maintained)

@twolfson
twolfson / .gitignore
Last active December 14, 2015 08:08
Attempt to reproduce spritesmith failing with many large images.
node_modules/
z_img*.jpg
output.png
output.css
@twolfson
twolfson / index.js
Last active March 16, 2024 05:32
Globstar demo
// Load in glob and fs
var glob = require('glob'),
fs = require('fs');
// Create a test directory
try { fs.mkdirSync('src'); } catch (e) {}
// Create a nested directory
try { fs.mkdirSync('src/nested'); } catch (e) {}
@twolfson
twolfson / .gitignore
Last active December 15, 2015 04:29
Attempt to reproduce spritesmith failing with too many images
node_modules/
z_img*.jpg
output.png
output.css
@twolfson
twolfson / counter.js
Last active December 15, 2015 19:09
Quick and dirty JS counter constructor
// ANTI-PATTERN: We have two inputs and they are non-object types (i.e. non-extensible)
/**
* Constructor function to create new counter for items
* @param {Array} items List of items to count
* @param {String} message Message to display every N items
*/
var STEP = 10;
function Counter(items, message) {
// Closure variables for counterFn
var count = 0,
@twolfson
twolfson / LICENSE.txt
Last active April 2, 2019 04:14 — forked from 140bytes/LICENSE.txt
Cross-browser currentStyle/getComputedStyle implementation https://github.com/twolfson/computedStyle
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@twolfson
twolfson / README.md
Created April 27, 2013 07:44
Windows trouble shooting post-mortem

This is to serve as a record for the trouble shooting that just occurred. As both a notice to myself, how I poorly approached the problem, and for future incidents.

I have not touched a Windows machine in a few months. Since it has been so recent (and during that time I was a node.js dev ON Windows) it surprised me as to how long it took me to deal with this problem.

What happened:

  1. Got an issue submission on grunt-spritesmith for gm and phantomjs not working on Windows (still have yet to deal with this)
  2. Grabbed an Win7 VM via ievms
  3. Installed [email protected] and shared folders with my normal machine
  4. Confirmed that grunt-spritesmith was failing
node_modules/
@twolfson
twolfson / .gitignore
Last active September 17, 2021 08:23
Scrape all GitHub watchers, stargazers, and followers
node_modules/
fixtures/
output/
config.json