This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Jekyll | |
# Compiled LESS CSS into CSS. You must specify an empty YAML front matter | |
# at the beginning of the file. | |
# .less -> .css | |
class LessConverter < Converter | |
safe true | |
priority :low | |
pygments_prefix "\n" | |
pygments_suffix "\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the old, lame way | |
protected var _property:Property; | |
public function get property():Property | |
{ | |
if (!_property) | |
{ | |
_property = new Property(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Jekyll | |
class TagCloudTag < Liquid::Tag | |
safe = true | |
def initialize(tag_name, text, tokens) | |
super | |
end | |
def render(context) | |
html = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- using the truncate filter --> | |
{% for post in site.posts limit:10 %} | |
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2> | |
<span class="post-date">{{ post.date | date: "%B %d, %Y" }}</span> | |
{% if post.content.size > 2000 %} | |
{{ post.content | truncatewords: 300 }} <!-- bad! content gives you rendered html and you will truncate in the middle of a node --> | |
<a href="{{ post.url }}">read more</a> | |
{% else %} | |
{{ post.content }} | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Keybonds | |
(global-set-key [(hyper a)] 'mark-whole-buffer) | |
(global-set-key [(hyper v)] 'yank) | |
(global-set-key [(hyper c)] 'kill-ring-save) | |
(global-set-key [(hyper s)] 'save-buffer) | |
(global-set-key [(hyper l)] 'goto-line) | |
(global-set-key [(hyper w)] | |
(lambda () (interactive) (delete-window))) | |
(global-set-key [(hyper z)] 'undo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Emacs starter for Emacs mac port | |
# Thanks to Aquamacs Project and David Reitter | |
my $args = ""; | |
my $tmpfiles = ""; | |
for my $f (@ARGV) { |
OlderNewer