Skip to content

Instantly share code, notes, and snippets.

View phaus's full-sized avatar
🦓

Philipp Haussleiter phaus

🦓
View GitHub Profile
@kylebarrow
kylebarrow / example.html
Created June 23, 2011 06:30
Prevent links in standalone web apps opening Mobile Safari
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>
@sunnyone
sunnyone / gist:1175673
Created August 27, 2011 18:07
OpenIndiana Update-2
$ sudo pkg set-publisher -O http://pkg.openindiana.org/dev-il/ openindiana.org
$ sudo pkg publisher
PUBLISHER TYPE STATUS URI
openindiana.org (preferred) origin online http://pkg.openindiana.org/dev-il/
opensolaris.org origin online http://pkg.openindiana.org/legacy/
$ sudo pkg image-update
WARNING: pkg(5) appears to be out of date, and should be updated before
running image-update. Please update pkg(5) using 'pfexec pkg install
pkg:/package/pkg' and then retry the image-update.
$ sudo pkg install pkg:/package/pkg
@sawanoboly
sawanoboly / wp.sh
Created October 10, 2011 08:27
Wordpress setup script for Joyent Smartmachine.
## WordPress Setup script for Joyent SmartMachine 1.3.6
## How to use.
# wget https://raw.github.com/gist/1274859/8508adf89853cfd9899648d3a867bfb5b81e0fe8/wp.sh --no-check-certificate -O - | bash
# Open http://{server address}
# 1.install mysql-server and apache,mod_php.
# 2.Download wordpress from svn repository.
# 3.create wp_config.php
@cyrusbeer
cyrusbeer / Avatar.java (Model)
Created January 26, 2012 18:25
Upload, Crop, and Resize an Image with the Play! Framework and jQuery
package models;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Transparency;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
@gcatlin
gcatlin / gist:1847248
Created February 16, 2012 19:43
Install specific version of Homebrew formula
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#
@bdha
bdha / vbox_to_kvm.txt
Created March 1, 2012 04:04
Migrating from VirtualBox to KVM on ZFS
# It's important to convert the vbox image (VMDK or VDI or whatever) using
# the same version of VirtualBox that created it. You can try converting the image
# with qemu-img or kvm-img, but weird version mismatches will possibly make it not
# work.
# On your VirtualBox machine:
cd $VBOX_ROOT/$MACHINE_ROOT/
VBoxManage clonehd machine.vmdk machine.img --format RAW
scp machine.img root@kvm-host:/somewhere
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@renatoathaydes
renatoathaydes / JavaFX in OSGi
Last active March 9, 2020 09:48
Packages needed by JavaFX 2.2 to work in OSGi
# Added the following extra packages to OSGI to enable JavaFX 2.2 (JRE 7 update 13)
# Extra packages appended after standard packages
org.osgi.framework.system.packages.extra=javafx.application;version=0.0.0, \
com.sun.browser.plugin; version=0.0.0, \
com.sun.deploy.uitoolkit.impl.fx; version=0.0.0, \
com.sun.deploy.uitoolkit.impl.fx.ui; version=0.0.0, \
com.sun.deploy.uitoolkit.impl.fx.ui.resources; version=0.0.0, \
com.sun.deploy.uitoolkit.impl.fx.ui.resources.image; version=0.0.0, \
@FND
FND / logbot.js
Created August 9, 2013 11:07
simplistic XMPP logging bot
/*jslint vars: true, node: true, white: true */
"use strict";
var xmpp = require("node-xmpp");
// XXX: hard-coded
var ROOM = "innoq@conference.jabber.innoq.com";
var NICK = "bot";
@zaus
zaus / WpPluginUpgradeBase.php
Last active October 2, 2020 17:10
Wordpress Activation/Upgrade Hook Helper
<?php
if(!class_exists('WpPluginUpgradeBase')) :
abstract class WpPluginUpgradeBase {
function __construct() {
add_action( 'admin_init', array(&$this, 'load_plugin') );
}