This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set f to choose file | |
set outputDirectory to (path to downloads folder as text) & "Excel:converted:" | |
-- make sure the outputDirectory exists and if not create it | |
if outputDirectory ends with ":" then set outputDirectory to text 1 thru -2 of outputDirectory | |
do shell script "mkdir -p " & quoted form of POSIX path of outputDirectory | |
-- save all worksheets as csv files | |
set csvPaths to {} | |
tell application "Microsoft Excel" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PIL doesn't know OS X comes with freetype. Add links before (re)installing. | |
# Now you can just install jpeg using homebrew, and then PIL with pip. | |
ln -s /usr/X11/include/freetype2 /usr/local/include/ | |
ln -s /usr/X11/include/ft2build.h /usr/local/include/ | |
ln -s /usr/X11/lib/libfreetype.6.dylib /usr/local/lib/ | |
ln -s /usr/X11/lib/libfreetype.6.dylib /usr/local/lib/libfreetype.dylib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// JQuery only used for selecting and removing elements, | |
// mostly left in for the below ALERT. | |
// the console.log statements are for your sanity checks. | |
var asa; var canvas; var dcanvas; var gl; var expmt; | |
canvas = $('#my-canvas'); | |
console.log(canvas); | |
// check to see if we can do webgl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -E -o "\b[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9.-]+\b" filename.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library('memisc') | |
args = commandArgs(trailingOnly=TRUE) | |
fname = args[1] | |
myData = as.data.set(spss.system.file(fname)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# Display the colors available in a terminal. | |
print "16-color mode:" | |
for color in range(0, 16) : | |
for i in range(0, 3) : | |
print "\033[0;%sm%02s\033[m" % (str(color + 30), str(color)), | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
write.table(file=pipe("pbcopy"), mydata, row.names=FALSE, sep="\t") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
splitcol = function(x, newcols, targetCol) { | |
# delete commas IN THE STATEMENTS SEPARATED BY COMMAS ROFLMAO | |
x[[targetCol]] = sub('tablet, such', 'tablet such', x[[targetCol]]) | |
x[[targetCol]] = sub('phone, tablet, or', 'phone tablet or', x[[targetCol]]) | |
# check for presence of known examples (newcols[2]) | |
for (i in newcols) { | |
x[[i[1]]] = ifelse(grepl(i[2], x[[targetCol]]), 1, 0) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> brew doctor | |
Warning: An outdated version of Git was detected in your PATH. | |
Git 1.7.10 or newer is required to perform checkouts over HTTPS from GitHub. | |
Please upgrade: brew upgrade git | |
> brew upgrade git | |
==> Upgrading 1 outdated package, with result: | |
git 1.8.3.4 | |
==> Upgrading git | |
git: No `python` found in your PATH! Consider to `brew install python`. |
OlderNewer