Skip to content

Instantly share code, notes, and snippets.

@martinklepsch
martinklepsch / gist:167410
Created August 13, 2009 19:41
AwesomeHTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
strLocation = window.location + "";
nIndex = strLocation.indexOf("index.html");
if (nIndex > 0)
{
#!/opt/local/bin/php
<?php
namespace VhostsManager;
/**
* autoload needed classes
*/
function __autoload( $class ){
require_once 'classes/' . $class . '.php';
}
Unit UCrapsGame;
INTERFACE
type
TSetType = Array[1..3] of Byte;
TSettingsType = record {seperate type to be able to pass settings ti a function}
startbudget: integer; {how much money each player will have in the beginning}
@martinklepsch
martinklepsch / Remove_macports.bash
Created April 19, 2010 13:36
Remove Macports by executing this little script
#!/bin/bash
sudo rm -rf \
/opt/local \
/Applications/DarwinPorts \
/Applications/MacPorts \
/Library/LaunchDaemons/org.macports.* \
/Library/Receipts/DarwinPorts*.pkg \
/Library/Receipts/MacPorts*.pkg \
/Library/StartupItems/DarwinPortsStartup \
/Library/Tcl/darwinports1.0 \
@martinklepsch
martinklepsch / shoppingcart(js) wishlist.md
Created April 21, 2010 14:50
Wishlist for the awesome shoppingcart(js)

Feature Ideas for shoppingcart(js)

  • CouchDB as product storage
  • support for categories with Quicksand
  • different payment methods within one store
  • mustache.js for templates
  • modal-window / lightbox for product details
    • different variants of one product
    • Nivo Slider to display product images
  • rebuilt on top of sammy.js
@martinklepsch
martinklepsch / fritzbox_reconnect.py
Created April 22, 2010 19:39
Simple script to reconnect your fritz.box
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Instruct an AVM FRITZ!Box via UPnP_ to reconnect.
This is usually realized with tools like Netcat_ or cURL_. However, when
developing in Python_ anyway, it is more convenient to integrate a native
implementation. This one requires Python_ 2.5 or higher.
UPnP_ (Universal Plug and Play) control messages are based on SOAP_, which is
>f windchill.sign
windchill.sign>e windchill(30,2)
checking windchill.impl
ERROR [windchill.impl at 6.34-6.42]: wrongly typed application
function: real**real->real
argument: denotation
ERROR [windchill.impl at 6.50-6.57]: undefined identification
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
; Phone = <Target Phone Number>
ISDN = 0
; Password = <Your Password>
New PPPD = yes
; Username = <Your Login Name>
Modem = /dev/ttyUSB0
The function should find the helpdesk that needs the smallest amount of time (bTime)
to fulfill an order with a specified type of concern (d).
art() returns the type of concern of a given order.
dorders should hold all orders with the specified concern d.
FUN fastest: seq[order] ** (concern -> bool) -> nat
DEF fastest(orders, d) ==
LET
dorders == filter(\\x. d(art(x)))(orders)

10 Ways to improve Github Issues

I love the new GitHub issues, here are some ideas to make it perfect, ordered by priority:

1. I should be able to pick the assignee and milestone via keyboard when creating a new ticket

2. Keyboard shortcuts should work everywhere. For example when viewing an existing issue, 'c' will not create a new one.

3. After creating an issue, the assigned user / milestone should be pre-filled when creating the next issue.

4. When commenting, I should also be able to assign a different user. Right now this deletes my half-typed comment.

5. When typing the @ symbol to mention somebody, it should auto-complete the name.

6. This might just be me, but things feel a little sluggish right now, any improvements would be very welcome.