Skip to content

Instantly share code, notes, and snippets.

hack the planet

Chris Schepman cschep

hack the planet
View GitHub Profile
cschep /
Last active Jun 16, 2020
DDG iOS Content Blocker Proposal

iOS Content Blocker Proposal


There are currently two ways that DuckDuckGo can help protect an iOS user’s privacy. The first, and best, is the user downloading the DuckDuckGo Privacy Browser and using that for all of their browsing. The other way is that the user continues to user Safari (or a different third party browser) and adopts DDG as their search engine. This prevents their searches from being tracked, but once they are off to browsing they are certain to be tracked again.


I propose adding a Content Blocker Extension to the DuckDuckGo Privacy Browser App. It’s a tough sell getting users to install a whole new browser, importing their shortcuts, learning a brand new UI, etc. It’s tough enough to get them to install an app in the first place!

View rtf.js
var RTFParser = function(rtfText) {
this.rtfText = rtfText;
this.ignoreList = [];
RTFParser.prototype.removeIgnoredLines = function() {
var rtfText = this.rtfText;
for (var i = 0; i < this.ignoreList.length; i++) {
rtfText = rtfText.replace(this.ignoreList[i], '');
View gist:3334aeb194ce46137899451c63615093
### Keybase proof
I hereby claim:
* I am cschep on github.
* I am cschep ( on keybase.
* I have a public key whose fingerprint is B5D5 D597 6BB3 2F5D 8BDD 9A6E 799F 9DC3 6F08 829C
To claim this, I am signing this object:
View gist:ceb1fc46e2e3571a208eb8c770ab2e5a
func logViewHierarchy(view: UIView) -> String {
var viewsPrinted = Set<UIView>()
var result: String = ""
func printViews(_ view: UIView, level: Int) {
guard !viewsPrinted.contains(view) else { return }
let padString = String(repeating: " | ", count: level)
result += ("\(padString) \(type(of: view))\n")
View gist:d22d1fd89a88daf67e6034741e33111d
std::vector<long> Journal::shotDatesForCurrentMethod() {
Method *current = currentMethod(false);
std::vector<long> dates;
if (current == nullptr || current->type() != Method::MethodType::shot) {
return dates;
for (long date : shotDates) {
if (date >= current->startDateNum()) {
View NSDateFormatter cheat sheet
a: AM/PM
A: 0~86399999 (Millisecond of Day)
c/cc: 1~7 (Day of Week)
ccc: Sun/Mon/Tue/Wed/Thu/Fri/Sat
cccc: Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday
d: 1~31 (0 padded Day of Month)
D: 1~366 (0 padded Day of Year)
View gist:a1d2ff3ecbbda4915be6
set -e
if [ ! -f $2 ]; then
touch $2
echo $1 >> $2
View gist:42eabff9ee1c7d6c6bda
" this isn't vi and apparently needs to be first?
set nocompatible
" pathogen
call pathogen#infect()
" shift O delay after insert mode? fuuuuu
set timeout timeoutlen=3000 ttimeoutlen=100
" copypaste
View gist:6eff7d561b7fa4dd661f
npm ERR! git clone --template=/Users/cschep/.npm/_git-remotes/_templates --mirror git:// /Users/cschep/.npm/_git-remotes/git-github-com-hackreactor-labs-utils-gulp-cardboard-git-03eb0a90
npm ERR! git clone --template=/Users/cschep/.npm/_git-remotes/_templates --mirror git:// /Users/cschep/.npm/_git-remotes/git-github-com-hackreactor-labs-utils-pagination-git-9573d19e
npm ERR! git clone --template=/Users/cschep/.npm/_git-remotes/_templates --mirror git:// /Users/cschep/.npm/_git-remotes/git-github-com-hackreactor-labs-utils-forkchop-git-abb2d4c8
npm ERR! git clone --template=/Users/cschep/.npm/_git-remotes/_templates --mirror git:// /Users/cschep/.npm/_git-remotes/git-github-com-hackreactor-labs-utils-gulp-problemify-git-2bf64c5c
npm ERR! git clone --template=/Users/cschep/.npm/_git-remotes/_templates --mirror ssh:
View gist:466d63f4581653f6a84d
;;in example.migration
(defn clean-db [& [force?]]
(if-not force?
(throw (Throwable.
"This is a destructive action! Pass in `force' to make this go through"))
(let [datasource (get-db-datasource)
flyway (doto (Flyway.)
(.setDataSource datasource)
(.setSqlMigrationPrefix ""))]
(.clean flyway))))