Skip to content

Instantly share code, notes, and snippets.


Save books out of Safari Books Online


This is hard. I spent way too much time figuring this out, because I was annoyed that a book I bought (Addison-Wesley) was available online for free, except only for 45 days after which payment was required. So I made this hack... probably useful to no one else, but here it is.


  1. iPad.
  2. Safari To Go (the Safari Books Online iPad app).
View worker nginx conf
location /video/ {
if ($request_uri ~ "^/video/(.+?)/.+") {
set $upstream_host $;
add_header Content-Disposition "attachment; filename=video.mp4;";
rewrite /video/.+?/(.+)$ /$1 break;
proxy_buffering off;
proxy_pass https://$upstream_host;
proxy_set_header Host $upstream_host;
View haproxy.conf
# This config file is a combination of ideas from:
while read link; do if [ ! -f "$(basename $link)" ]; then wget $link; fi; done < GDMAG.txt
View gist:8862054
#go to folder:
/Applications/Adobe Photoshop CS6/Locales/pt_BR/Support Files/tw10428.dat
#rename the file tw10428.dat for tw10428.bak
View MyColorSchemes.cs
using Livity.Collections;
using Livity.Composition;
using Livity.Text.Logic;
using Livity.Text.UI.Engine;
using Livity.Text.UI.Engine.Internal;
using UnityEngine;
namespace Livity.Mine
View brewv
# Installs the previous version of a Homebrew formula
# Usage: brewv formula_name desired_version
# Based on
# Author: Matti Schneider <> (
View FDrawingSprite.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/* Author @jpsarda
* A drawing class.
* Examples :
View 1 SingletonBehaviour.cs
public abstract class SingletonBehaviour<Interface> : MonoBehaviour
where Interface : class
private static Interface _instance = null;
public static Interface instance { get { return _instance; } }
void Awake()
System.Diagnostics.Debug.Assert(this is Interface);
View TouchToMouseConverter.cs
Converts Mobile Touch to the default Mouse Click
## invoked these method in Mobile too
## only called in touch screen