Skip to content

Instantly share code, notes, and snippets.

View sukima's full-sized avatar

Devin Weaver sukima

View GitHub Profile

Project

Description: What does this project do and who does it serve?

Project Setup

How do I, as a developer, start working on the project?

  1. What dependencies does it have (where are they expressed) and how do I install them?
  2. How can I see the project working before I change anything?
@tlberglund
tlberglund / photos_tag.rb
Created September 30, 2012 20:28 — forked from sukima/photos_tag.rb
Jekyll Plugin for easy FancyBox usage
# Title: Photos tag for Jekyll
# Authors: Devin Weaver
# Description: Allows photos tag to place photos as thumbnails and open in fancybox. Uses a CDN if needed.
#
# ** This only covers the markup. Not the integration of FancyBox **
#
# To see an unabridged explination on integrating this with [FancyBox][1]
# Please read my [blog post about it][2].
#
# [1]: http://fancyapps.com/fancybox/
@domenic
domenic / promises.md
Last active April 1, 2025 01:54
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@polotek
polotek / ember_hurdles.md
Last active March 30, 2017 05:37
Hurdles getting started with Ember.js

This is a brain dump of my experience trying to get something going with Ember.js. My goal was to get to know the ins and outs of the framework by completing a pretty well defined task that I had lots of domain knowledge about. In this case reproducing a simple Yammer feed. As of this time, I have not been able to complete that task. So this is a subjective rundown of the things I think make it difficult to get a handle on Ember. NOTE: My comments are addressing the Ember team and giving suggestions on what they could do to improve the situation.

App setup

The new guides have pretty good explanation of the various parts of the framework; routers, models, templates, views. But it's not clear how they all get strapped together to make something that works. There are snippets of examples all over the place like:

App.Router.map(function() {
  match('/home').to('home');
});
@sukima
sukima / jsbin_settings.js
Last active December 11, 2015 23:38
My personalized settings for JSBin.com
(function(settings, libraries) {
localStorage.setItem('settings', JSON.stringify(settings));
localStorage.setItem('libraries', JSON.stringify(libraries));
setTimeout(function() {
window.location = window.location; // Force refresh
}, 0);
})(
//Settings
{
"panels": [
@sukima
sukima / README.md
Last active December 12, 2015 00:28 — forked from neoGeneva/gist:1309070

Super Simple Event Dispatcher

Use this to add events to your objects without needing any libaries.

Simple function can be imported or copy pasted. In your object constructor assign your event functions to the return value of the createCustomEvent().

Simple example:

@aaronksaunders
aaronksaunders / app_snippet.js
Last active July 11, 2020 14:07
One way to do bulk updates and deletes with Appcelerator Alloy Collections
// add all items to collection
Alloy.Collections.Fugitive.reset([{
"name" : "Jeff Haynie"
}, {
"name" : "Nolan Wright"
}, {
"name" : "Don Thorp"
}, {
"name" : "Marshall Culpepper"
}, {
@benkitzelman
benkitzelman / safeRead.js
Last active December 16, 2015 03:49
A safe format function to read deeply nested properties (i.e. my.nested.value)... If any property in the chain is null or undefined, an empty string will be returned
//
// Usage... for a nested structure
// var test = {
// nested: {
// value: 'Read Correctly'
// }
// };
// safeRead(test, 'nested', 'value'); // returns 'Read Correctly'
// safeRead(test, 'missing', 'value'); // returns ''
//
@sukima
sukima / foo.sh
Created April 18, 2013 02:43
An example of shell arguments without getopt or getopts
#!/bin/bash
while test $# -gt 0
do
case $1 in
# Normal option processing
-h | --help)
# usage and help
;;
-v | --version)
@quephird
quephird / best-ios-games.txt
Last active December 16, 2015 10:39
This is a top-ten list, in no particular order, of what I believe to be the best games on the iOS platform.
Badland - Platformer/puzzler
Cordy 2 - Platformer
Phoenix HD - Bullet hell shmup
Danmaku Unlimited 2 - Bullet hell shump
DoDonPachi Resurrection - Bullet hell shmup
Plants vs. Zombies - Tower defense
Monster's Inc Run - Platformer
Bad Piggies - Puzzler
Bug Princess 2 - Bullet hell shmup
EDGE EX - Puzzler