Skip to content

Instantly share code, notes, and snippets.

@mul14
mul14 / 00_etc-hosts.md
Last active October 29, 2024 13:11
/etc/hosts for Vimeo, Reddit, Imgur, GitHub, DigitalOcean, dll

Unblock Steam, Vimeo, Reddit, Imgur, GitHub, DigitalOcean, NPM, PayPal, dll

Saya support Internet Positif untuk memblokir porn, situs judi, dan hal-hal ilegal lainnya. Tapi pemerintah dan ISP sangat konyol karena tidak mengizinkan akses ke Vimeo, Reddit, Imgur, Netflix--yang mana bukanlah situs dengan konten utama ilegal.

Linux / BSD / macOS

Tambahkan list di bawah ke /etc/hosts.

Windows

@heatxsink
heatxsink / glog-example.go
Last active March 25, 2023 06:02
An example of how to use golang/glog.
/*
glog-example
------------
background
---
You probably want to read the source code comments at the top of the glog.go file in
the golang/glog repository on github.com. Located here: https://github.com/golang/glog/blob/master/glog.go
setup
@sonnyksimon
sonnyksimon / javascript.js
Last active March 13, 2020 17:48
Reduce a list of users and a list of roles for each user into a single unified listing of users.
const data = JSON.parse(`{
"users": [
{
"id": 1,
"name": "basicuser"
},
{
"id": 2,
"name": "adminuser"
}
@sonnyksimon
sonnyksimon / uol.txt
Last active February 24, 2020 22:45
Su Mo Tu We Th Fr Sa
Feb 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29 you are here
Mar 1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21 lv4 & lv5 cw2 due
22 23 24 25 26 27 28
@sonnyksimon
sonnyksimon / README.md
Last active March 13, 2020 17:47
content mapping in jq :: the filter maps each post to its slug, and the reverse filter reverts it

content mapping in jq :: the filter maps each post to its slug, and the reverse filter reverts it

@sonnyksimon
sonnyksimon / google-spending.js
Created August 29, 2022 03:31
Calculate Google Spending from Chrome Console
// Google Activity URL: https://pay.google.com/gp/w/u/0/home/activity
// add the id `x-payments-hist` to the tbody
// containing the payments after viewing
// all records (i.e. it says "No more transactions")
let payments = [];
let rows = document.querySelectorAll("#x-payments-hist > tr");
rows.forEach(function(node) {
let r = {};
@sonnyksimon
sonnyksimon / _string-similarity.txt
Last active February 23, 2024 04:18
string similarity
Can we implement all of these algorithms?
Similarity Algorithms:
- Cosine
- Fuzzy Wuzzy
- Jaccard
- Jaro
- Jaro Winkler
- Q-gram
- Sørensen DIce