Skip to content

Instantly share code, notes, and snippets.

@timvisee
timvisee / falsehoods-programming-time-list.md
Last active April 20, 2025 16:27
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@nemotoo
nemotoo / .gitattributes
Last active April 17, 2025 05:35
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@ccstone
ccstone / References For Learning & Using Applescript.md
Last active April 14, 2025 10:57
References For Learning & Using Applescript

REFERENCES FOR LEARNING & USING APPLESCRIPT Modified: 2018/06/19 18:47


NOTES

AppleScript is a rather peculiar scripting language to learn.

@fractaledmind
fractaledmind / Evernote2Markdown
Last active December 27, 2015 20:09
REQUIREMENTS --Satimage osax plugin for Applescript --Aaron Swartz's html2text python script --Evernote This script takes your currently selected Evernote note and generates a Markdown copy of it in your Documents folder. It will then automatically open the new Markdown text file and holds the Markdown itself in the clipboard.
(* EVERNOTE TO MARKDOWN
--Stephen Margheim
--11/9/13
--open source
REQUIREMENTS
--Satimage osax plugin
--Aaron Swartz's html2text python script
--Evernote
@fractaledmind
fractaledmind / Markdown2Evernote
Created November 9, 2013 08:06
REQUIREMENTS: MultiMarkdown, Evernote. This script accepts text from the clipboard in (Multi)Markdown format and passes it to Evernote as HTML. The script also accepts 3 lines of metadata: Title, Notebook, and Keywords.
property markdownloc : "/usr/local/bin/multimarkdown"
property tid : AppleScript's text item delimiters
set mdSource to the clipboard
--check for Title metadata
try
if text item 1 of paragraph 1 of mdSource = "#" then
if not text item 2 of paragraph 1 of mdSource = "#" then
set theTitle to text items 3 thru -1 of paragraph 1 of mdSource as string
@fractaledmind
fractaledmind / Export all Skim Notes to Evernote with Hyperlinks
Created September 7, 2013 23:15
This script will (as the title suggests) export all of you Skim notes directly to Evernote with hyperlinks. It relies on the GENERATE TOP 3 NOTES WITH SYSTEM URL script that will put 3 notes at the top of the PDF with linking information. When launched, the script will ask you if the current PDF is a Primary Source or a Secondary Source. Your ch…
@benwaldie
benwaldie / 2013-04-12-TUAW_Waldie.applescript
Created April 12, 2013 18:17
TUAW > OmniFocus > Prepare Task Completion Report
-- This property controls whether full project paths (including parent folders) are displayed
property includeFullProjectPaths : true
-- These properties control whether additional task content is displayed
property includeTaskContext : true
property includeTaskEstimatedTime : true
property includeTaskStartDate : true
property includeTaskModificationDate : true
property includeTaskCompletionDate : true
property includeTaskNotes : true
@jeredb
jeredb / Log to Day One.scpt
Created February 24, 2012 19:26
Based on Brett Terpstra's Log Taskpaper Archives to Day One, except for Omnifocus.
(*
Jered Benoit
jeredb.com
Omnifocus -> Day One Daily Completed Task Log
Based upon [Version 1.0] [1] of [OmniFocus - Weekly Project Report Generator] [2]
Originally Authored by Chris Brogan and Rob Trew
February 5, 2012
@Adam0101
Adam0101 / NSRegularExpressions Example iOS.m
Created January 13, 2011 15:55
Example for blog post at www.remarkablepixels.com on NSRegularExpressions
- (NSString *)stripOutHttp:(NSString *)httpLine {
// Setup an NSError object to catch any failures
NSError *error = NULL;
// create the NSRegularExpression object and initialize it with a pattern
// the pattern will match any http or https url, with option case insensitive
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"https?://([-\\w\\.]+)+(:\\d+)?(/([\\w/_\\.]*(\\?\\S+)?)?)?" options:NSRegularExpressionCaseInsensitive error:&error];
// create an NSRange object using our regex object for the first match in the string httpline
NSRange rangeOfFirstMatch = [regex rangeOfFirstMatchInString:httpLine options:0 range:NSMakeRange(0, [httpLine length])];
// check that our NSRange object is not equal to range of NSNotFound
if (!NSEqualRanges(rangeOfFirstMatch, NSMakeRange(NSNotFound, 0))) {
@dysinger
dysinger / simple-nginx-webdav.sh
Created January 5, 2010 20:32
A simple nginx/webdav setup for use with things like mobile-org
#!/bin/sh
# on ubuntu: need some utils & dev libs
sudo apt-get install apache2-utils openssl libssl-dev libpcre3-dev
# compile nginx
cd /tmp
curl http://nginx.org/download/nginx-0.7.64.tar.gz | tar xz
cd nginx*
./configure --with-http_ssl_module --with-http_dav_module \