Skip to content

Instantly share code, notes, and snippets.

Michael Dales mdales

Block or report user

Report or block mdales

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:83a99f9afe948ae903bb
SUMMARY="Irssi is a command line irc client"
DESCRIPTION="Irssi is a command line irc client"
HOMEPAGE="http://www.irssi.org/"
SRC_URI="http://www.irssi.org/files/irssi-0.8.16-rc1.tar.gz"
CHECKSUM_SHA256="bb6c0125db30b697f80837941c17372b7484c64d57a6920b8bfa7ee3def92de3"
REVISION="1"
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
SOURCE_DIR="irssi-0.8.16-rc1"
@mdales
mdales / gist:6b97ff366f210d741178
Created Mar 22, 2015
Script in swift to write a view out to a TIFF file
View gist:6b97ff366f210d741178
#!/usr/bin/env xcrun swift
import Cocoa
// library code (one day)
func convertViewToTIFF(view: NSView) -> NSData? {
let application = NSApplication.sharedApplication()
application.setActivationPolicy(NSApplicationActivationPolicy.Accessory)
View pre-commit
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by git-commit with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, make this file executable.
# This is slightly modified from Andrew Morton's Perfect Patch.
View closure testing
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>closuretest</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js">
</script>
<script>
var list = [
View IE, and another in Firefox...
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>atest</title>
</head>
<body id="atest" onload="">
<a href="#blah">
<table border="2">
@mdales
mdales / Arduino LED server
Created Dec 29, 2010
Simple code to turn LEDs on/off based on web request.
View Arduino LED server
#include <Client.h>
#include <Dhcp.h>
#include <dns.h>
#include <Ethernet.h>
#include <Server.h>
#include <sockutil.h>
#include <Udp.h>
#include <util.h>
#include <SPI.h>
@mdales
mdales / pythonstartup.py
Created Mar 4, 2011
LAzy django assistant
View pythonstartup.py
import readline, rlcompleter
readline.parse_and_bind ("bind ^I rl_complete")
globals().update({"test": 123})
test2 = 123
try:
from django.conf import settings
except ImportError:
pass
@mdales
mdales / gist:1120262
Created Aug 2, 2011
Failed bootstrap for cappuccino
View gist:1120262
oak[cappuccino]% ./bootstrap.sh 15:09
================================================================================
Narwhal JavaScript platform is required. Install it automatically now?
Enter "yes" or "no":
yes
================================================================================
To use the default location, "/usr/local/narwhal", just hit enter/return, or enter another path:
Downloading Narwhal from "http://github.com/280north/narwhal/zipball/master"...
% Total % Received % Xferd Average Speed Time Time Time Current
@mdales
mdales / gist:1267789
Created Oct 6, 2011
Django settings import
View gist:1267789
import os
if os.path.exists('/etc/myapp_django_settings.py'):
execfile('/etc/myapp_django_settings.py')
if os.path.exists('local_django_settings.py'):
execfile('local_django_settings.py')
View gist:1287089
0010 Z0FZ MBP 15.4/2.4/CTO
With the following configuration:
Processor 2.4GHz Intel Core 2 Duo
Memory 4GB 1066Mz DDR3 SDRAM-2x1GB
Hard Drive 500GB Serial ATA @ 7200
Optical DriveSuperDrive 8X DL
Keyboard and Documentation KYBD/User's Guide -B
Country Kit/AEXCountry Kit-GBR
You can’t perform that action at this time.