Skip to content

Instantly share code, notes, and snippets.

View aghouseh's full-sized avatar

Andrew Householder aghouseh

View GitHub Profile
@sponomarev
sponomarev / command.sh
Created November 9, 2013 10:43
Remove iTerm2 icon from Dock
# remove
/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist
# restore
/usr/libexec/PlistBuddy -c 'Delete :LSUIElement' /Applications/iTerm.app/Contents/Info.plist
@bennadel
bennadel / code-1.cfm
Last active March 21, 2020 11:05
What If ColdFusion Recognized More Truthy / Falsey Values
<cffunction
name="truthy"
access="public"
returntype="boolean"
output="false"
hint="I determine if the given argument can be converted / shoe-horned into a boolean value. By default, we will be trying to create a FALSE; everything else will be TRUE.">
<!--- Define arguments. --->
<cfargument
name="value"
@nicolasembleton
nicolasembleton / restart_bluetooth.sh
Last active May 11, 2024 17:43
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@ericelliott
ericelliott / essential-javascript-links.md
Last active May 17, 2024 03:38
Essential JavaScript Links
@hissy
hissy / get_download_statistics.php
Created April 10, 2016 07:32
#concrete5 retrieve file download statistics
<?php
$conn = Database::connection();
$qb = $conn->createQueryBuilder();
$qb->select('*')
->from('DownloadStatistics')
->orderBy('timestamp', 'ASC');
if ($startdate = $_GET['startdate']) {
$qb->andWhere(
@bennadel
bennadel / RetryProxy.cfc
Created July 28, 2017 22:16
Creating A Generic Proxy For Retry Semantics In ColdFusion
component
output = false
hint = "I provide automatic retry functionality around the target component."
{
/**
* I initialize the retry proxy with the given target component. Retries will
* only be applied to "transient" errors. And, since the proxy doesn't know which
* errors are transient / retriable, it must check with the isTransientError()
* function.