Skip to content

Instantly share code, notes, and snippets.

public function openLinkInBackground(url:String):void
{
NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, applicationDeactivateHandler);
navigateToURL(new URLRequest(url));
}
protected function applicationDeactivateHandler(event:Event):void
{
NativeApplication.nativeApplication.removeEventListener(Event.DEACTIVATE, applicationDeactivateHandler);
@rpetrich
rpetrich / index.php
Created October 14, 2010 21:52
Twitter self-hosted image service/url shortener
<?
// Twitter self-hosted image service/url shortener by Ryan Petrich
// Installation:
// 1. Paste this script into the top of your HTTP root's index.php (rename index.html to index.php if it doesn't exist)
// 2. Add the following to your HTTP root's .htaccess file (create .htaccess if it doesn't exist):
// ErrorDocument 404 /index.php
// 3. Create a "s" subfolder and give it 777 permissions
// 4. Add the following as the custom URL for URL shortening in Twitter for iPhone's settings:
// http://yourdomain.com/?d=%@&p=password
// 5. Add the following as the custom URL for Image service:
// the old, lame way
protected var _property:Property;
public function get property():Property
{
if (!_property)
{
_property = new Property();
}
@codebutler
codebutler / install-tapchat-irssi.sh
Created May 2, 2012 21:40
TapChat for Irssi installer
#!/bin/bash
# TapChat for Irssi Installer
#
# Authors:
# Eric Butler <eric@codebutler.com>
#
# See http://tapchatapp.com for more information
APT_PACKAGES="libanyevent-http-perl libnet-ssleay-perl libuuid-tiny-perl liburi-query-perl libauthen-passphrase-perl libdbd-sqlite3-perl libdbix-class-perl libcrypt-generatepassword-perl libcrypt-cbc-perl libcrypt-rijndael-perl libmime-base64-urlsafe-perl liburi-encode-perl"
@dszakallas
dszakallas / readme.md
Last active September 6, 2017 07:55
Modern JavaScripting a MIDI controller

Modern JavaScripting a MIDI controller

Abstract: Blogpost summarizing the challenges of creating a flexible and customizable MIDI controller mapping for Mixxx targeting multiple Novation Launchpad grid controllers.

Keywords: JavaScript, MIDI, Mixxx, ES6 modules, Babel, Flow

I own two Novation Launchpads. The most iconic use-cases of this cool grid controller is launching samples. Launchpad cover videos are very popular on YouTube. These are done by slicing up the songs, and playing back live, spiced with some flashy visual effects.

You can also use launchpads for DJing. While being fit for a handful of things: cueing samples, beatjumping and looping, etc.; the Launchpad have neither a jogwheel nor any rotary controls or faders, so it falls short on functions like scratching or crossfading. Thus, it’s best to use as companion to your other DJ gear.

@moeffju
moeffju / de-dictionary-profanity.xml
Last active November 18, 2017 08:48
Android LatinIME Profanity List for German (de)
<wordlist locale="de" description="Deutsch" date="1339787575" version="15" options="german_umlaut_processing">
<!-- snip -->
<w f="0" flags="">Dummkopf</w>
<w f="0" flags="n">after</w>
<w f="0" flags="n">anal</w>
<w f="0" flags="n">angekettet</w>
<w f="0" flags="n">anus</w>
<w f="0" flags="n">ausgezogen</w>
<w f="0" flags="r">bastard</w>
<w f="0" flags="r">besoffen</w>
@ttscoff
ttscoff / jekyllpre.rb
Last active September 7, 2019 16:02
Marked Custom Processor for Jekyll/Octopress previews with img/gist Liquid tags
#!/usr/bin/ruby
# encoding: utf-8
# Version 1
#
# Example custom processor for use with Marked <http://markedapp.com> and Jekyll _posts
# It's geared toward my personal set of plugins and tags, but you'll get the idea.
# It turns
# {% img alignright /images/heythere.jpg 100 100 "Hey there" "hi" %}
# into
# <img src="../images/heythere.jpg" alt="Hey there" class="alignright" title="hi" />
@alphapapa
alphapapa / magit.sh
Last active April 5, 2020 10:18
Run a standalone Magit editor!
# Please see the script's new home: https://github.com/alphapapa/magit.sh
@wolfgangmm
wolfgangmm / gist:5880377
Last active July 16, 2020 12:59
eXist-db: reinstall dashboard and shared-resources if broken. Run the following query through eXide - or if this fails: the Java admin client.
repo:remove("http://exist-db.org/apps/shared"),
repo:remove("http://exist-db.org/apps/dashboard"),
repo:install-and-deploy("http://exist-db.org/apps/shared", "http://exist-db.org/exist/apps/public-repo/find"),
repo:install-and-deploy("http://exist-db.org/apps/dashboard", "http://exist-db.org/exist/apps/public-repo/find")
@jonsuh
jonsuh / url_encode.rb
Created February 1, 2015 17:28
Jekyll URL Encode
# _plugins/url_encode.rb
require 'liquid'
require 'uri'
# Percent encoding for URI conforming to RFC 3986.
# Ref: http://tools.ietf.org/html/rfc3986#page-12
module URLEncode
def url_encode(url)
return URI.escape(url, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
end