Skip to content

Instantly share code, notes, and snippets.

View hectormethod's full-sized avatar

Scott K. hectormethod

View GitHub Profile
@hectormethod
hectormethod / aurora service Web.config key
Created November 3, 2017 19:04
[aurora service Web.config key]
<add key="AuroraServiceTestServer" value="http://10.40.65.24:8080/" />
@hectormethod
hectormethod / MakeWindowActive
Last active October 4, 2017 14:29
[Applescript to make application window active] The toggling of the visibility is necessary to deal with some weirdness that occurs with switching applications. If you don't toggle the visibility, the window won't be the first when you switch away from and back to the application. Unfortunately, this toggling shrinks the window to the dock then …
to raiseWindow of theApplicationName for theName
tell the application named theApplicationName
activate
set theWindow to the first item of ¬
(get the windows whose name is theName)
if index of theWindow is not 1 then
set index to 1
set visible to false
set visible to true
end if
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AbandonProcessGroup</key>
<true/>
<key>Label</key>
<string>com.tjluoma.check-for-dropbox-conflicted-copies</string>
<key>ProgramArguments</key>
<array>
@hectormethod
hectormethod / dropbox-launchd-conflicted-copy.sh
Last active September 19, 2017 18:56
[dropbox duplicates script]
#!/bin/zsh
#
# Author: Timothy J. Luoma
# Email: luomat at gmail dot com
# Date: 2011-03-24
#
# Purpose: Find conflicted copies in Dropbox
NAME=`echo $0:t`
@hectormethod
hectormethod / Asset.txt
Last active September 12, 2017 13:52
[Bash find and remove command] #bash
$ find . -name "*.ext" -exec rm '{}' ';'
@hectormethod
hectormethod / Asset.txt
Last active September 19, 2017 18:56
[directory actions]
file:get_cwd().
cd("/Users/hector/Dropbox/_Programming/CS401_Prog_Langs_WB2/MakeRings/src").
cd("/Users/hector/Dropbox/School/CS401\ Program\ Lang/assignment\ 2\ Erlang/").
# get list of in current dir
filelib:wildcard("*").
@hectormethod
hectormethod / Asset.txt
Last active September 12, 2017 14:02
[find Dropbox conflicted copy]
find ~/Dropbox/ -path "*(*'s conflicted copy [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]*" -print
@hectormethod
hectormethod / Asset.scpt
Last active September 12, 2017 14:03
[Evernote to DevonThink] #applescript
(*
http://veritrope.com
EVERNOTE TO DEVONTHINK EXPORTER
VERSION 1.72
March 10, 2013
// TERMS OF USE:
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
@hectormethod
hectormethod / Asset.txt
Last active September 12, 2017 13:51
[disable Google Chrome Print Preview] #bash
defaults write com.google.Chrome DisablePrintPreview -boolean true
@hectormethod
hectormethod / Asset.txt
Last active September 12, 2017 13:44
[add ip block for faster youtube] #bash
sudo ipfw add reject src-ip 173.194.55.0/24 in
sudo ipfw add reject src-ip 206.111.0.0/16 in
sudo ipfw list
sudo ipfw delete <some entry>