Skip to content

Instantly share code, notes, and snippets.

@etoews
etoews / local.conf
Created June 11, 2014 20:20
local.conf for TXLF 2014
[[local|localrc]]
# Credentials
DATABASE_PASSWORD=devstack
ADMIN_PASSWORD=devstack
SERVICE_PASSWORD=devstack
SERVICE_TOKEN=devstack
RABBIT_PASSWORD=devstack
# Services
@caspahouzer
caspahouzer / gist:a4d0f0093a9110ac8913
Created December 17, 2014 12:44
download file and save to private ios directory
function getFileAndSave (filename, url) {
var file_obj = {
file: filename,
url: url,
path: null
};
var testFile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory);
var privateDocFolder = testFile.nativePath.replace('Documents/', '');
privateDocFolder += 'Library/Private%20Documents/';
@jmblog
jmblog / test1.js
Created June 1, 2012 04:31
Examples of shim config in RequireJS 2.0 - Backbone and underscore
require.config({
paths: {
underscore: '../underscore-min'
},
shim: {
underscore: {
exports: function() {
return _.noConflict();
}
}
@doublerebel
doublerebel / titanium-inspector.sh
Last active October 11, 2015 07:18
How to use Node-Inspector to Debug Titanium Mobile Applications
npm install -g node-inspector
/path/to/.titanium/mobilesdk/linux/3.1.0.GA/android/builder.py simulator projectname /path/to/android-sdk-linux /path/to/project com.your.project 16 WVGA800 127.0.0.1:5858
node-inspector
<?xml version="1.0" encoding="UTF-8"?>
<ti:app xmlns:ti="http://ti.appcelerator.org">
<id>de.appwerft.cm</id>
<name>CriticalMass</name>
<version>1.0.0</version>
<publisher>rainerschleevoigt</publisher>
<url>http://</url>
<description>not specified</description>
<copyright>2014 by rainerschleevoigt</copyright>
<icon>appicon.png</icon>
@Su-Shee
Su-Shee / geocouchosm
Last active December 28, 2015 12:34
adding geocouch to couchdb and add osm data
1) have the couchdb source available, geocouch needs some headerfiles
2) get and unpack the appropriate branch of geocouch suited for your couchdb version -
I have 1.3.0 so I got
https://github.com/couchbase/geocouch/tree/couchdb1.3.x
3) set environment:
export COUCH_SRC=/WHEREVER/apache-couchdb-1.3.0/src/couchdb/
@mscharley
mscharley / app.js
Last active May 25, 2017 23:33 — forked from radiosilence/gist:4040553
RequireJS with Zurb Foundation 5
/*
This assumes that your bower_components folder is /assets. I renamed it in .bower.json for sanities sake.
I use baseUrl = '/js' as this is where all my custom javascript is and requirejs can't navigate
bower's folder structure anyway.
*/
requirejs.config({
paths: {
@etoews
etoews / local.conf
Created April 18, 2014 20:40
DevStack local.conf for OpenStack Icehouse
[[local|localrc]]
# Credentials
DATABASE_PASSWORD=devstack
ADMIN_PASSWORD=devstack
SERVICE_PASSWORD=devstack
SERVICE_TOKEN=devstack
RABBIT_PASSWORD=devstack
# Services
@feldmayer
feldmayer / gist:3370310
Created August 16, 2012 13:57
Drupal 7: Load block programmatically with i18n
<?php
$block_id = 2;
$block = block_block_view($block_id);
$block['content'] = i18n_string(array('blocks', 'block', $block_id, 'body'), $block['content']);
?>
@mguymon
mguymon / websocket.conf
Created June 11, 2013 14:05
stunnel config for secure websockets (wss://)
key = /etc/certs/server.key
cert = /etc/certs/server.crt
CApath = /etc/ssl/certs
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
setuid = stunnel4
setgid = stunnel4
pid = /var/run/stunnel4/websocket.pid