Skip to content

Instantly share code, notes, and snippets.

View ayn's full-sized avatar
🍉
wfh

Andrew Ng ayn

🍉
wfh
View GitHub Profile
@ayn
ayn / localization.txt
Last active February 4, 2017 19:46
localization text
# App onboarding flow
en: Why tap photos when you can swipe to select!
ru: Зачем тыкать по каждой фотографии? Достаточно провести по ним палцем!
zh-TW: 簡單的滑動手指就能夠輕鬆的選擇照片!
en: Give it a little shake to get back to your photo roll.
ru: Встряхните свой телефон, что бы вернуться в фотогалерею.
zh-TW: 搖一搖iPhone可以回到你的「相片膠卷」和「儲存的照片」
@thewellington
thewellington / crashplanFixup.sh
Last active October 27, 2018 06:11
Prevent CrashPlan from de-duplicating data on a Mac. Improves transfer speed! #mac #blog #crashplan
#!/bin/bash
#
# crashplanFixup.sh for Macintosh OS X 10.9 (and probably earlier versions)
#
# This script will prevent CrashPlan from de-duplicating data on files greater than 1k.
# Based on information from http://networkrockstar.ca/2013/09/speeding-up-crashplan-backups/
#
# NOTE: Must be run with sudo! IE: $ sudo sh ./crashplanFixup
#
# v1.1 2014-03-13 by bill@wellingtonnet.net
@raws
raws / 01-install.txt
Created November 23, 2012 03:34
Install Ruby 1.9.3-p327 on a Synology DS1511+ with DSM 4.1
#########################################
### Install wget-ssl over ipkg's wget ###
#########################################
$ ipkg install -verbose_wget libidn # To get ipk URL
$ ipkg install -verbose_wget wget-ssl # To get ipk URL
$ /usr/syno/bin/wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/libidn_1.25-1_i686.ipk
$ /usr/syno/bin/wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/wget-ssl_1.12-2_i686.ipk
$ ipkg install libidn_1.25-1_i686.ipk
$ ipkg install wget-ssl_1.12-2_i686.ipk
@andreacremaschi
andreacremaschi / UITableView+Header
Last active June 28, 2020 04:19
UITableView category to resize table view header using autolayout
UITableView convenience classes for resizing header and footer with autolayout.
@protocool
protocool / caveatPatchor.js
Created February 14, 2011 02:29
Sample caveatPatchor.js file for use in Propane 1.1.2 and above
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@jspahrsummers
jspahrsummers / GHRunLoopWatchdog.h
Created January 28, 2015 20:50
A class for logging excessive blocking on the main thread
/// Observes a run loop to detect any stalling or blocking that occurs.
///
/// This class is thread-safe.
@interface GHRunLoopWatchdog : NSObject
/// Initializes the receiver to watch the specified run loop, using a default
/// stalling threshold.
- (id)initWithRunLoop:(CFRunLoopRef)runLoop;
/// Initializes the receiver to detect when the specified run loop blocks for
@amercier
amercier / synology-scheduled-tasks.md
Last active January 10, 2024 08:31
Turn leds on/off on Synology DiskStation

Synology scheduled tasks

Usage

Go to Control Panel / Task Scheduler and add the content of these scripts as root scripts.

Leds

@onewheelskyward
onewheelskyward / generate-hombrew-install-commands.rb
Last active February 16, 2024 08:57
brew reinstall commands
brews = []
out = IO.popen("brew list", "r") do |io|
brews = io.read.split "\n"
end
def parse(brew, brew_info)
in_options = false
print "brew reinstall -v #{brew} "
brew_info.split("\n").each do |m|
#puts m.inspect
@ha1f
ha1f / CIFilter+Extension.swift
Last active February 20, 2024 08:14
CIFilter+Extension.swift
//
// Created by はるふ on 2017/12/11.
// Copyright © 2017年 ha1f. All rights reserved.
//
import Foundation
import CoreImage
import AVFoundation
extension CIFilter {

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,