Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@smowden
smowden / after_prepare.js
Created July 21, 2016 15:45
ES6 version for adding intent filters via cordova hooks on android
module.exports = function (context) {
const fs = require('fs');
const _ = require('lodash');
const scheme = 'flowkey';
const insertIntent = `
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
@smowden
smowden / after_prepare.es5.js
Last active December 31, 2016 14:04
ES5 version for adding intent filters via cordova hooks on android
'use strict';
module.exports = function (context) {
var fs = require('fs');
var _ = require('lodash');
var scheme = 'flowkey';
var insertIntent = '\n <intent-filter>\n <action android:name="android.intent.action.VIEW"></action>\n <category android:name="android.intent.category.DEFAULT"></category>\n <category android:name="android.intent.category.BROWSABLE"></category>\n <data android:scheme="' + scheme + '"></data>\n </intent-filter>\n ';
var manifestPath = context.opts.projectRoot + '/platforms/android/AndroidManifest.xml';
var androidManifest = fs.readFileSync(manifestPath).toString();
@smowden
smowden / 0_reuse_code.js
Created December 11, 2013 12:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@smowden
smowden / gist:4634105
Last active December 11, 2015 17:19
return all unique classes and ids (or other attributes) of children contained within a html element (requires jquery)
(function(){
var containedElems = $('#container *');
var findAttribs = {
'class': [],
'id': []
};
containedElems.each(function(i, elem){
for(var curAttrib in findAttribs){
var elemAttrib = $(elem).attr(curAttrib)
@smowden
smowden / cofounder
Created February 10, 2012 00:26
Cofounder wanted
Under funded but over motivated new startup is looking for a second technical cofounder to make us a trio.
What is this about?
Our startup is working on aggregating, categorizing and contextualizing data from across the internet
in a business context and evaluating people based on a algorithm that is fed by the gathered data.
(so if you are looking for a position at some cookie cutter webapp you can stop reading right here)
We (one technical and one nontechnical founder) are looking for another
nerd/programmer/web developer/software engineer/hacker/pythonista/ninja/rockstar/code enthusiast/generalist/brogrammer
or whatever you prefer to call yourself to join our team.