Skip to content

Instantly share code, notes, and snippets.

View dkemper's full-sized avatar

Daniel Kemper dkemper

  • Munich, Germany
View GitHub Profile
@rsudip90
rsudip90 / nullHandle.go
Last active September 5, 2024 15:29
How I handled the null possible value in a sql database row in golang?
package main
import (
"database/sql"
"encoding/json"
"fmt"
"reflect"
"time"
"github.com/go-sql-driver/mysql"
@kemitchell
kemitchell / today.AppleScript
Created January 16, 2011 05:16
Short AppleScript for dumping descriptions of today's events from iCal to the console. Meant for use with GeekTool.
#!/usr/bin/osascript
-- calendar from which to ignore events
set TASKS_CALENDAR to "Toodledo iCal"
-- the current timestamp
set now to (current date)
-- midnight this morning
set today to now - (time of now)
-- midnight tomorrow morning
set tomorrow to (today) + (24 * 60 * 60)
-- list of output lines