Skip to content

Instantly share code, notes, and snippets.

View dvdvck's full-sized avatar

David Retana dvdvck

View GitHub Profile
@jfhbrook
jfhbrook / app.js
Created February 25, 2012 06:22
THE FRAMEWORK YOUR FRAMEWORK COULD CODE LIKE
var flatiron = require('flatiron'),
app = flatiron.app;
console.log('What\'s that in your hand? Look down,');
app.use(require('./tickets'));
console.log('look up. I HAVE IT. It\'s ' + app.qty + ' TICKETS to ' + app.description + '!');
console.log('Look again.');
app.use(require('./diamonds'));
@stonehippo
stonehippo / gist:2344029
Created April 9, 2012 14:54
Prevent UIWebview "rubber band" scrolling in Phonegap apps on iOS
/*
Inserting the following into application:didFinishLaunchingWithOptions: in
the AppDelegate.m of your app will prevent the parent UIWebview for scrolling
with the "rubber band" bouncing effect, which can make the app feel more native.
*/
// Prevent the webview rubber-banding behavior (but allow other stuff to scroll)
[[[self.viewController.webView subviews] lastObject] setScrollEnabled:NO];
@jthomas
jthomas / nano.profile.js
Created July 23, 2012 11:05
Nano-build profile
var profile = (function(){
return {
layerOptimize: "closure",
releaseDir: "../../../release",
packages:[{
name:"dojo",
location:"../../../dojo"
}],
@dpogue
dpogue / compile_jade.js
Created November 17, 2012 22:37
A cordova-client hook to compile ./www/jade/index.jade to ./www/index.html as part of the build process.
#!/usr/bin/env node
/**
* Darryl Pogue, 2012
*
* A cordova-client hook to compile ./www/jade/index.jade to ./www/index.html as part of the build process.
* Requires node.js and jade to be installed.
*
* Copy this into the .cordova/hooks/before_build folder of your project, and make it executable.
*/
var fs = require('fs');
@dantoncancella
dantoncancella / Installing Sublime Text 2 on Fedora (yum)
Last active February 5, 2019 22:54
Installing Sublime Text 2 on Fedora (yum)
# Add repository
yum-config-manager --add-repo http://repo.cloudhike.com/sublime2/fedora/sublime2.repo
# Enable repository
yum-config-manager --enable
# Installin Sublime Text 2
yum install sublime-text
#Tested on Fedora 17, 18
@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active November 29, 2023 15:35
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
#!/bin/bash
BASE_DIR=${TMPDIR:-/var/tmp}
ORIG_DIR=$PWD
HASH_CMD="md5sum"
DIR_NAME=`echo $PWD | $HASH_CMD | cut -f1 -d " "`
TMP_DIR=$BASE_DIR/$DIR_NAME
mkdir -p $TMP_DIR