Skip to content

Instantly share code, notes, and snippets.

@eethann
eethann / dotask.sh
Last active January 22, 2019 12:13 — forked from fmartingr/dotask.sh
Add check for empty ID, to avoid unhandled error where no ID specified
#!/bin/bash
TMPFILE='/tmp/rofi-dmenu-taskwarrior'
task rofi rc.verbose=nothing > $TMPFILE
TASK=`rofi -dmenu -p "Task: " -i -input $TMPFILE`
TASK_ID=`echo $TASK | cut -f1 -d' '`
<?php
/**
* when twitpic URL is found in filtered $text, download the image file
* - use curl to get info from API on actual URL (w/ temporary auth key)
* - then use that URL to download the file to local $dl_dir
* @return downloaded file path or FALSE
*/
function _twitpic_filter_download_twitpic($pic_code) {
$pic_url = 'http://twitpic.com/show/full/' . $pic_code;