Skip to content

Instantly share code, notes, and snippets.

@peta
peta / myvm.vmx
Last active August 29, 2015 13:57
Virtual network settings of VMware virtual machine container (VMX-file)
ethernetX.present = "TRUE"
ethernetX.connectionType = "nat"
ethernetX.addressType = "generated"
ethernetX.startConnected = "TRUE"
ethernetX.generatedAddressOffset = "0"
ethernetX.virtualDev = "e1000"
ethernetX.wakeOnPcktRcv = "FALSE"
ethernetX.linkStatePropagation.enable = "FALSE"
ethernetX.vnet = "vmnetX"
ethernetX.bsdName = "en0"
@peta
peta / dhcpd.conf
Created April 1, 2014 00:33
[blog] VMware Fusion configuration files
# Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet8.
#
# This file was automatically generated by the VMware configuration program.
# See Instructions below if you want to modify it.
#
# We set domain-name-servers to make some DHCP clients happy
# (dhclient as configured in SuSE, TurboLinux, etc.).
# We also supply a domain name to make pump (Red Hat 6.x) happy.
#
@peta
peta / random-poweredby.js
Created July 17, 2014 18:51
Lustige Powered-By-Fußnote von der-postillon.com
// easter-egg
(function() {
var $random = $('#campudus-random');
var $randomClick = $('#campudus-random-click');
var a = [ 'attraktiven', 'beliebten', 'bescheidenen', 'coolen', 'epischen', 'erfahrenen', 'fröhlichen', 'guten', 'gnädigen', 'humorvollen', 'kaputten', 'klaustrophobischen', 'liebevollen', 'multidimensionalen', 'prämierten', 'tollen', 'verdorbenen', 'verschrobenen', 'zauberhaften' ];
var b = [ 'Designer', 'Freunde', 'Gorillas', 'Helden', 'Jungs', 'Kids', 'Kellerkinder', 'Knacker', 'Kollegen', 'Krieger', 'Männer', 'Nerds', 'Ninjas', 'Opas', 'Roboter', 'Tiere', 'Programmierer', 'Zauberer', 'Zebras' ];
$randomClick.click(function(e) {
$random.text(a[Math.floor(Math.random()*a.length)] + ' ' + b[Math.floor(Math.random()*b.length)]);
});
@peta
peta / gist-test.sparql
Created January 21, 2015 21:33
Gist linguist test
#QUERY <http://localhost:9090/test-rdf-fuseki/query>
#UPDATE <http://localhost:9090/test-rdf-fuseki/update>
PREFIX : <urn:example#>
INSERT DATA {
:instDefault :theLabel 'Hello from DEFAULT graph'
GRAPH :graph1 { :instDefault1 :theLabel 'Hello from graph1'. :instDefault1b :theLabel 'Hello from graph1'. }
GRAPH :graph2 { :instDefault2 :theLabel 'Hello from graph2'. :instDefault2b :theLabel 'Hello from graph1'.}
GRAPH :graph3 { :instDefault3 :theLabel 'Hello from graph3'. :instDefault3b :theLabel 'Hello from graph1'.}
// WAY 1 - Instantiating an anonymous function
var MySingleton = new (new MyClass(args));
// WAY 2 - Using an instance manager
var getMySingleton = (function(options) {
function MyClass(args) {}
var singleton;
return function(args) {
return singleton ? singleton : singleton = new MyClass(args);
// WAY 1 - Instantiating an anonymous function
var MySingleton = new (new MyClass(args));
// WAY 2 - Using an instance manager
var getMySingleton = (function(options) {
function MyClass(args) {}
var singleton;
return function(args) {
return singleton ? singleton : singleton = new MyClass(args);
-- PF.WrapSelectionWithFolder.applescript
--
-- Created by Peter Geil on 05.12.09.
-- Copyright 2009 Peter Geil. All rights reserved.
registerWithGrowl()
var NamespaceManager = new function() {
// Used to store dependencies; Two Arrays because there are
// probably multiple dependencies on the same classes
var memberIds = [],
callbacks = [];
// Used to store ALL loaded classes
var loaded = [];
var repeat = 500;
// Using Crockford's Module Pattern
console.profile("Crockford's Module Pattern");
var arrObjLit = [],
iObjLit = repeat;
while (iObjLit--) {
(function() {
"""
This fabric file makes setting up and deploying a django application much
easier, but it does make a few assumptions. Namely that you're using Git,
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have
Django installed on your local machine and SSH installed on both the local
machine and any servers you want to deploy to.
_note that I've used the name project_name throughout this example. Replace
this with whatever your project is called._