Skip to content

Instantly share code, notes, and snippets.

Max Masnick masnick

Block or report user

Report or block masnick

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@masnick
masnick / SAS defaults.sas
Last active Aug 29, 2015
Sensible SAS defaults
View SAS defaults.sas
dm 'odsresults; clear';; /* Clears results from Results bar every time you run this line. */
dm 'clear log'; /* Clear the log window every time you run this line. */
dm 'clear out'; /* Clear the output file every time you run this line. */
ods listing; /* Turn on old style output */
options nodate pageno=1 linesize=80 pagesize=60 source; /* Old style output display settings */
View keybase.md

Keybase proof

I hereby claim:

  • I am masnick on github.
  • I am masnick (https://keybase.io/masnick) on keybase.
  • I have a public key whose fingerprint is B899 A28A 08DF ABEF F98F B8A6 DCCA 9E3F D712 5546

To claim this, I am signing this object:

View tenderlove.txt
-----BEGIN PGP MESSAGE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: GPGTools - https://gpgtools.org
hQEMA8MeMF20Q5DgAQf+IVPiuUEeCPfE+vbJRfDxVavbb2g0oRg7VZJCAfXRnRcX
pOE6lDIQeJrpMkoXwVC/Ks8XTJGc+Z+MPFyBZxw/iKtuL/Ij2vjHjCIZT95k5gZf
W8m5tYmryRQLb2+haMtgLnPvx8JPAK/79TExmFwwEsnfemVJDgwlQoTpJNWSZ08Z
1uRjZKw4MTRAjN/67jKCNun1C7WT+rzPOulRmlDTevSxDF8RCzLCeBSSQS+rc/Mp
NxHRK4ZCKT0Ul1qC35/d0FjNN/DBreOXYE8nzCEAAhfuk1LGCJrHLjAyfa5b7mKS
yN8y9+nezcaykFysSinazBOCVvupe0UY0d2rJD7ySdLpAUvy7UbgQZNHhvOzaC18
@masnick
masnick / gist:9761488
Last active Aug 29, 2015
Beats feedback
View gist:9761488

I switched to Beats because the iPhone app is great, and the Rdio app (my previous music service) did not handle offline music well.

Unfortunately, I listen to most music through my computer, and the Beats web player is terrible. I know you're working on improving it, but some issues, like logging me out every 24 hours, are just bad design decisions. Little progress has been made on the web player since I signed up, and the current buggy player is too annoying to continue using.

Other issues with the web player:

  • Playback randomly cutting out, requiring a refresh to fix
  • Stopping and then resuming playback after more than a few minutes was very unreliable: clicking "play" wouldn't start the track again, and none of the play icons for other tracks would work. Refreshing was the only solution (and sometimes I'd be inexplicably logged out), and the app wasn't smart enough to remember what I was listening to so I'd have to manually navigate back to where I was.
  • Can't view library on web player
  • Requires Fl
@masnick
masnick / modified-zotselect-link.js
Last active Aug 29, 2015
Zotero export translator for getting zotero:// link and article information
View modified-zotselect-link.js
@masnick
masnick / osx.bash
Created Oct 3, 2014
OS X preferences
View osx.bash
#!/usr/bin/env bash
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@masnick
masnick / gist:93571525a7204f50ee7c
Last active Aug 29, 2015
SAS code for getting PROC FREQ to make a 2×2 contingency table with the variables in the proper order
View gist:93571525a7204f50ee7c
/* Set up some dummy data */
data tmp;
input exposure outcome count;
datalines;
0 0 6
0 1 2
1 0 4
1 1 11
;
View gist:c935c75dd02adbb17501
| | Death | No death |
|-----------|-------|----------|
| Treatment | 4 | 0 |
| Control | 0 | 4 |
|-----------|-------|----------|
@masnick
masnick / Gemfile
Created Apr 3, 2015
Barebones LiveReload with guard example
View Gemfile
source 'https://rubygems.org'
gem 'guard'
gem 'guard-livereload', '~> 2.4', require: false
gem 'rack-livereload'
gem 'sinatra'
gem 'thin'
@masnick
masnick / gist:d8d694a20b634329cc33
Created Apr 23, 2015
Rotate your desktop background immediately with this AppleScript
View gist:d8d694a20b634329cc33
tell application "System Events"
set desktopnames to get display name of every desktop
repeat with currentdesktop in desktopnames
tell (every desktop whose display name is currentdesktop)
set initInterval to get change interval -- get the currrent display interval
set change interval to -1 -- force a change to happen right now
set change interval to initInterval -- change it back to the original display interval
end tell
end repeat
end tell
You can’t perform that action at this time.