What the defaults do and how to undo them
defaults write com.apple.screencapture disable-shadow -bool true
killall SystemUIServer
sudo vim /etc/postfix/sasl_passwd
//this function composes functions like in Haskell (and most other functional languages) | |
//the final composed function can accept parameters dictated by the chain it creates | |
//you can pass it a list of functions and it shall apply them from RIGHT to LEFT (right associativeness?) | |
//eg., c0(fn1, fn2, fn3)(10) => return fn1(fn2(fn3(10))); | |
// out<---<----<----<=10 | |
function c0(f, g) { | |
var last; | |
if (!arguments.length) return; | |
if (arguments.length === 1) return f; | |
if (arguments.length === 2) { |
--taken from http://benguild.com/2012/04/11/how-to-import-tasks-to-do-items-into-ios-reminders/#comment-1346894559 | |
--set theFileContents to (read file "Users:n8henrie:Desktop:Reminders.txt") -- Change this to the path to your downloaded text file with your tasks in it! (Note the : instead of a / between folders) Or, just name them Reminders.txt and put them in your downloads folder | |
--set theLines to paragraphs of theFileContents | |
set theLines to {"task name 1", "task name 2"} | |
repeat with eachLine in theLines | |
tell application "Reminders" | |
set mylist to list "Your List Name" | |
tell mylist | |
make new reminder at end with properties {name:eachLine, due date:date "7/10/2014 3:00 PM"} |
#!/usr/bin/ruby | |
require 'shellwords' | |
query = ARGV.length > 0 ? ARGV.join(" ") : "date:today" | |
files = %x{mdfind '#{ARGV.join(" ")}'}.split("\n")[0..100] | |
filehash = {} | |
files.each {|file| | |
base = File.basename(file) |
💯 👍 👎 🔢 🎱
#!/bin/sh | |
# Redirect output to stderr. | |
exec 1>&2 | |
# enable user input | |
exec < /dev/tty | |
consoleregexp='console.log' | |
# CHECK | |
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0 | |
then |
Thanks to this article by Christoph Berg
Directories and files
~/
(* functions *) | |
-- string replace function from http://www.macosxautomation.com/applescript/sbrt/sbrt-06.html | |
on replace_chars(this_text, search_string, replacement_string) | |
set AppleScript's text item delimiters to the search_string | |
set the item_list to every text item of this_text | |
set AppleScript's text item delimiters to the replacement_string | |
set this_text to the item_list as string | |
set AppleScript's text item delimiters to "" | |
return this_text |