Skip to content

Instantly share code, notes, and snippets.

@MichaelMackus
MichaelMackus / phinditforme.php
Created Apr 30, 2011 — forked from mheadd/phinditforme.php
A Tropo script to find locations in Philadelphia.
View phinditforme.php
<?php
/**
* PhindItForMe - an IM, SMS, Twitter and Phone application that finds locations in Philadelphia.
*
* @copyright 2011 Mark J. Headd (http://www.voiceingov.org)
* @author Mark Headd
*/
// Constants used to geocode an address.
View nodejs
#!/bin/sh
#
# description: This script runs a node.js instance for a specific user & application.
# The idea is to allow multiple userland node.js instances.
#
# Run with /etc/init.d/node start USERNAME [USERHOME]
# Above will launch the node.js instance in HOME/app/app.js
#
View row_height.js
function evenRowHeights() {
// count the rows
// requires each column to have the same number of rows as column 1
var rowCount = $('.stat-table .c1 > div').length;
$('.stat-table .c1 > div').height('auto');
for (i=0; i<rowCount; i++) {
rowNum = i+1
var tallest = 0;
$('.stat-table .r' + rowNum).each(function() {
if($(this).height() > tallest) {
View IncludeRawExtension.php
<?php
class IncludeRawExtension extends \Twig_Extension
{
public function getFunctions()
{
return [
new \Twig_SimpleFunction(
'includeRaw',
[$this, 'includeRaw'],
View xmonad.hs
import XMonad
import XMonad.Config.Azerty
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig
import Graphics.X11.ExtraTypes.XF86
import XMonad.Layout.Spacing
import XMonad.Layout.NoBorders(smartBorders)
import XMonad.Layout.PerWorkspace
@MichaelMackus
MichaelMackus / ardour
Created May 20, 2020
Ardour helper script to check the audio interface is setup properly
View ardour
#!/bin/sh
DEVICE="UMC1820"
CARD="$(aplay -l | grep "$DEVICE" | sed 's/^card \([0-9]*\).*/\1/')"
TERMINAL="st"
# find the following settings with amixer -c $CARD
CLOCK_SOURCE_SETTING="UMC1820 Clock Selector Clock Source"
CLOCK_SOURCE_VALUE="Item0: 'Coaxial In SPDIF'" # ensure this value is set for clock source
CLOCK_VALIDITY_SETTING="Coaxial In SPDIF Validity"