Skip to content

Instantly share code, notes, and snippets.

huyz /
Last active Sep 22, 2020 — forked from Vartkat/
Bash script to build a restic exclude list that mimics Apple TimeMachine exclude list
# This script intend to mimic TimeMachine exclude list.
# As the exclude list can evolve between backups it has to be rebuilt before every backup
# Apple uses 5 types of excludes:
# - 4 `/System/Library/CoreServices/backupd.bundle/Contents/Resources/StdExclusions.plist`
# - and files from applications where metadata says to not backup, these can be found usinr
# `sudo mdfind "com_apple_backup_excludeItem = ''"`
huyz / cardinalConstraints.js
Last active Jun 29, 2019
Uber interview question: cardinal constraints
View cardinalConstraints.js
// Problem description:
function areCardinalConstraintsValid(rules) {
function _areCardinalConstraintsValid(rules) {
// We choose N-S and E-W instead of S-N and W-E because of the English idioms "north to south" and "east to west",
huyz /
Created Sep 25, 2017
Keybase proof

Keybase proof

I hereby claim:

  • I am huyz on github.
  • I am huyz ( on keybase.
  • I have a public key ASCgkbXDeXXUtEJVuhp0RQHxFxkm7IDZR633ZjEZYvEVxwo

To claim this, I am signing this object:

View merge_asana_into_omnifocus.rb
#!/usr/bin/env ruby -E utf-8
# merge_asana_into_omnifocus.rb
# Hilton Lipschitz
# Use and modify freely, attribution appreciated
# Script to import Asana projects and their tasks into
# OmniFocus and keep them up to date from Asana.
huyz / main_decompiled.js
Created Sep 6, 2011
Google+ Translate extension main.js decompiled
View main_decompiled.js
/* Copyright 2011 Google */
(function() {
var injectionScript = fillInTemplate("(function(){({{$code}})();})();", {
code: window.injection.toString()
injectorScript = fillInTemplate("(function(){({{$code}})();})();", {
code: window.injector.toString()
delete window.injector;
delete window.injection;
huyz / wp-syntax.css
Created Jul 4, 2011
wp-syntax.css for Twenty-Ten WP theme
View wp-syntax.css
#content .wp_syntax {
color: #100;
background-color: #f9f9f9;
border: 1px solid silver;
margin: 0 0 1.5em 0;
overflow: auto;
/* IE FIX */
#content .wp_syntax {
huyz / less.vim
Created Jul 3, 2011
less.vim debugging
View less.vim
" Vim script to work like "less"
" huyz 2011-07-03 Modified for better quit handling. See 'm' script.
" Maintainer: Bram Moolenaar <>
" Last Change: 2006 Dec 05
" Avoid loading this file twice, allow the user to define his own script.
if exists("loaded_less")
You can’t perform that action at this time.