Skip to content

Instantly share code, notes, and snippets.

View gist:8831568
android:permission="course.labs.permissions.DANGEROUS_ACTIVITY_PERM" >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
rondinif / gist:9058989
Created Feb 17, 2014
Debugging Mobile Chrome using Desktop Chrome via ADB port forwarding.
View gist:9058989
adb forward tcp:9222 localabstract:chrome_devtools_remote
View DemoDocumentProvider
Copyright (c) 2014 CommonsWare, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at Unless required
by applicable law or agreed to in writing, software distributed under the
OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License.
lucaspiller / Gemfile
Last active Apr 22, 2016
photos2tidy.rb - scripts to free your photos from
View Gemfile
source "httpso://"
gem 'sqlite3'
gem 'exiftool'
ryanj / .openshift\action_hooks\pre_build_nodejs
Last active May 24, 2016
Include support for packaging globally installable npm modules, or other executables, locally within a project's source (node_modules/.bin/)
View .openshift\action_hooks\pre_build_nodejs
# Projects which rely on npm modules which are normally installed using "npm install -g"
# can make those dependencies available on OpenShift by including this file in their project source.
# Add this content to your project as ".openshift/action_hooks/pre_build_nodejs"
# Then, save your npm dependencies locally (without the '-g' flag):
# > npm install module_name --save
# Finally, add and commit your changes:
dviramontes / cors.js
Created Jun 19, 2013
cors.js Nicholas Zakas' helper method to help sort out the browser differences in CORS or Cross Origin Resource Sharing support.
View cors.js
function createCORSRequest(method, url) {
var xhr = new XMLHttpRequest();
if ("withCredentials" in xhr) {
// Check if the XMLHttpRequest object has a "withCredentials" property.
// "withCredentials" only exists on XMLHTTPRequest2 objects., url, true);
} else if (typeof XDomainRequest != "undefined") {
dviramontes / jsonParser.js
Last active Jun 15, 2016
Ext.decode vs JSON.parse
View jsonParser.js
// 48 instances of Ext.decode
// 23 instances of Ext.encode
// collection size 7
(function() {
var x = Ext.decode(temp1.responseText);
})()//test: 0.597ms
#!/usr/bin/env bash
ruby -e "(-12..42).each { |i| print \"#{i}:\"; o=''; ARGV[0].each_byte { |x| o+=(x.ord-i).chr }; p o}" $name | grep 32 | sed "s/.*:\"\(.*\).$/\1/"
mr-niels-christensen / index.html
Last active Oct 29, 2016
Semantic Web Recipes: Add a description using jquery and dbpedia lookup
View index.html
<html lang="en">
<div class="item">
<b>Insert title here</b>
<div>Insert description here</div>
<div class="item">
<b>Insert title here</b>
<div>Insert description here</div>
MarZab / Gruntfile.js
Last active May 20, 2017
comments for npm package.json with a grunt.js task
View Gruntfile.js
/*jslint node: true */
'use strict';
module.exports = function (grunt) {
1. make package.json.js and export the json that will be saved as package.json
2. run grunt package.json, the new file will be written and you get a patch as well
grunt.registerTask('package.json', function () {