Skip to content

Instantly share code, notes, and snippets.

View ErikFontanel's full-sized avatar

Erik Gelderblom ErikFontanel

View GitHub Profile
@ErikFontanel
ErikFontanel / gist:4724452
Last active December 12, 2015 05:48
Error log of using incremental search on a new user account. Reproduce: 1. Open file 2. Press Ctrl+S 3. Enter string, press Ctrl+S a few times 4. Press Esc to stop typing 5. Window stops updating, pressing ctrl+s still works, highlights are rendered.
2/6/13 6:49:25.213 PM TextMate: *** Assertion failure in -[NSAutoresizingMaskLayoutConstraint _setSymbolicConstant:constant:], /SourceCache/AppKit/AppKit-1138.51/Layout.subproj/NSLayoutConstraint.m:596
2/6/13 6:49:25.213 PM TextMate: Constant is not finite! That's illegal. constant:nan
2/6/13 6:49:25.228 PM TextMate: (
0 CoreFoundation 0x00007fff8a6fcf56 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff92a51d5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff8a6fcd8a +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff86f9871f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
4 AppKit 0x00007fff896133b9 -[NSLayoutConstraint _setSymbolicConstant:constant:] + 162
5 AppKit 0x00007fff8960ef67 +[NSAutoresizingMaskLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:mul
@ErikFontanel
ErikFontanel / gist:5004115
Last active December 14, 2015 01:09
Error log of using incremental search in Textmate 2.0.0-alpha.9377 on OS X 10.5.7. Screenshot of Textmate window: http://i.imgur.com/lCAVXK7.png
2/21/13 12:26:42.999 PM TextMate: *** Assertion failure in -[NSAutoresizingMaskLayoutConstraint _setSymbolicConstant:constant:], /SourceCache/AppKit/AppKit-1138.51/Layout.subproj/NSLayoutConstraint.m:596
2/21/13 12:26:42.999 PM TextMate: Constant is not finite! That's illegal. constant:nan
2/21/13 12:26:43.019 PM TextMate: (
0 CoreFoundation 0x00007fff85a4df56 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff8dda2d5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff85a4dd8a +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff822e971f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
4 AppKit 0x00007fff849643b9 -[NSLayoutConstraint _setSymbolicConstant:constant:] + 162
5 AppKit 0x00007fff8495ff67 +[NSAutoresizingMaskLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribu
@mixin clearfix {
&:after {
content: "";
display: table;
clear: both;
}
}
@mixin vertical-align {
position: relative;
top: 50%;
@ErikFontanel
ErikFontanel / stickyheader.js
Created November 25, 2015 10:10
Very simple auto hiding sticky header
$(document).ready(function() {
var initialOffset = -1;
var headerHeight = $("#global__header").outerHeight();
$(window).scroll(function(event) {
var scrollOffset = $(this).scrollTop();
scrollOffset > initialOffset && scrollOffset > headerHeight ? $("#global__header").addClass("hide-header") : initialOffset > scrollOffset && $("#global__header").removeClass("hide-header"),
initialOffset = scrollOffset
}
)
}
@ErikFontanel
ErikFontanel / README.md
Created December 13, 2016 16:28 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@ErikFontanel
ErikFontanel / TimberPatternLabLoader.php
Created July 28, 2017 14:07
Wordpress Timber Pattern Lab Pattern Loader
/**
* Custom PatternLab Loader for Timber
*
* How to use:
* Place this somewhere in your functions.php, make sure Timber WordPress plugin is installed and activated.
* This code assumes Pattern Lab is installed in the same directory as your theme.
* Change $patternlabSource below if you want to use a different path to Pattern Lab.
*
* This code hooks into Timber when Timber initialises the Twig_Loader_Filesystem
* uses default Timber loader if Pattern Lab patterns aren't found.
@ErikFontanel
ErikFontanel / karabiner.json
Last active October 20, 2017 17:41
Varmilo VA68 Mac keyboard layout. Sets the command, option and control keys in the right place. Changes insert to home too. Add this under 'Simple Modifcations' to you keyboard profile for your Varmilo keyboard in karabiner.json.
"simple_modifications": [
{
"from": {
"key_code": "insert"
},
"to": {
"key_code": "home"
}
},
{
@ErikFontanel
ErikFontanel / instructions.md
Last active July 12, 2023 08:28
run jottacloud-command-line-tool on busybox/optware
  1. Install ca-bundle opkg update && opkg install ca-bundle if not already installed for https
  2. Download the binary from https://repo.jotta.us/archives/linux/arm64/ and untar in /opt/jotta-cli
  3. cd into the jotta-cli dir
  4. Modify source=/usr/share/jottad to source="/opt/usr/share/jottad" /in ./usr/share/jottad/install.sh
  5. run ./usr/share/jottad/install.sh and ./usr/share/jottad/install-path.sh
  6. modify group=jottad to group=tmusers and add umask=0002 in /etc/init.d/jottad
  7. create the jottad data directory mkdir -p /opt/.jottad
  8. Start jottad with start-stop-daemon -b -x /opt/bin/jottad slow lowmem datadir /opt/.jottad -S (add this to /etc/rc.local to start automatically)
  9. Login jotta-cli login
@ErikFontanel
ErikFontanel / apfd.conf
Last active January 4, 2020 16:55
Time Capsule on optware
;
; Netatalk 3.x configuration file
;
[Global]
; Global server settings
; Inspiration and background:
; http://blog.khubla.com/freebsd/time-machine-backups-using-freebsd-zfs
;
; create group tmusers, add users
@ErikFontanel
ErikFontanel / filter-youtube-domains.sh
Last active November 28, 2023 18:55
Pi-hole Youtube ad blocking
#!/bin/sh
# This script will fetch the Googlevideo ad domains and append them to the Pi-hole block list.
# Run this script daily with a cron job (don't forget to chmod +x)
# More info here: https://discourse.pi-hole.net/t/how-do-i-block-ads-on-youtube/253/136
# File to store the YT ad domains
FILE=/etc/pihole/youtube.hosts
# Fetch the list of domains, remove the ip's and save them
curl 'https://api.hackertarget.com/hostsearch/?q=googlevideo.com' \