Skip to content

Instantly share code, notes, and snippets.

View tsekityam's full-sized avatar
🏘️
Working from home

Tse Kit Yam tsekityam

🏘️
Working from home
View GitHub Profile
testing

Import external filter lists

Custom filter lists

External filter lists of interest

Use these filter lists at your own risk: the more filter lists one adds, the higher the probability of breakage. Quality varies. Some filter lists could contains broad filter exceptions which defeat other block filters. The maintainers are responsible for the content of their respective filter list.

Feel free to add whatever filter list you think is worth it -- order alphabetically according to filter list title (as it appears inside the list). Example of the markdown for "Fanboy's Anti-thirdparty Fonts":

  1. Download instantclient-basic-macos.x64-11.2.0.4.0.zip and instantclient-sdk-macos.x64-11.2.0.4.0.zip from http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html to ~/
  2. cd ~
  3. unzip instantclient-basic-macos.x64-11.2.0.4.0.zip
  4. unzip instantclient-sdk-macos.x64-11.2.0.4.0.zip
  5. cd instantclient_11_2
  6. ln -s libclntsh.dylib.11.1 libclntsh.dylib
  7. cd ~
  8. wget https://github.com/vrogier/ocilib/releases/download/v4.2.1/ocilib-4.2.1-gnu.tar.gz
  9. tar -zxvf ocilib-4.2.1-gnu.tar.gz
  10. cd ocilib-4.2.1
@tsekityam
tsekityam / convertor.py
Created August 17, 2016 15:50
Convert host.txt to JSON format used by iOS content block list
import sys
Hosts = sys.argv[1]
Rules = './blockerList.json'
in_file = open(Hosts, 'r')
out_file = open(Rules, 'w')
items = []
for line in in_file.readlines():
@tsekityam
tsekityam / resetLaunchpad.sh
Created September 3, 2016 15:20
a simple script for reseting your launchpad on macOS >= 10.10
defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock
@tsekityam
tsekityam / mainwindow.cpp
Created October 12, 2016 04:34
Demo toggle line with text displayed
// mainwindow.cpp
// Testing code for port of Scintilla to Qt.
// Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware
#include <QtGui>
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
#include <QFileDialog>
#endif
#include "mainwindow.h"
@tsekityam
tsekityam / resetLaunchpad.sh
Created October 13, 2016 15:54
simple script for reset Launchpad on macOS
defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock
@tsekityam
tsekityam / opml.xml
Created October 18, 2016 14:01
A simple opml template for adding new feed to AOL Reader
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>AOL Reader add feed helper</title>
</head>
<body>
<outline type="rss" text="NYT > Home Page" title="NYT > Home Page" xmlUrl="http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml" htmlUrl="http://www.nytimes.com/pages/index.html?partner=rss&emc=rss"/>
</body>
</opml>
@tsekityam
tsekityam / Scintilla #1879.md
Last active November 2, 2016 10:14
Scintilla / Bugs / #1879 weird background colour of line with a marker on a zero width margin
  • How to reproduce:

    1. Add the following code to ScintilaTest xcode project, AppController.mm, - (void) setupEditor method.

// Marker setup. [mEditor setGeneralProperty: SCI_SETMARGINWIDTHN parameter: 1 value: 0]; [mEditor setGeneralProperty: SCI_MARKERDEFINEPIXMAP parameter: 0 value: (sptr_t)box_xpm]; [mEditor setGeneralProperty: SCI_MARKERADD parameter: 0 value: 0];

1. Run the project
import pickle
import cv2
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
# Read in the saved camera matrix and distortion coefficients
# These are the arrays you calculated using cv2.calibrateCamera()
dist_pickle = pickle.load( open( "wide_dist_pickle.p", "rb" ) )
mtx = dist_pickle["mtx"]