Skip to content

Instantly share code, notes, and snippets.

View 0x3333's full-sized avatar

Tercio Filho 0x3333

  • São Paulo, Brazil
  • 07:52 (UTC -03:00)
View GitHub Profile
@0x3333
0x3333 / README.md
Last active August 29, 2015 14:17
Scroll to an element if not visible
@0x3333
0x3333 / README.md
Last active February 3, 2016 15:49
DHCPD active lease reporter

DHCPD Pool active lease reporter

This python script will print all active leases availables in the /var/lib/dhcp/dhcpd.leases file.

This is not my work! See Author below.

Output example:

+--------------------------------------------------------------------------------------------------

| DHCPD ACTIVE LEASES REPORT

Karabiner Config

Karabiner private.xml for Logitech K750 for Mac

  • Remap Dashboard(F4/F12) to Launchpad
@0x3333
0x3333 / directive.md
Created April 27, 2016 22:30
AngularJS 1.X Checkbox Directive

AngularJS 1.X Checkbox Directive

Will evaluate an expression when checked state is changed. A $checked parameter will be passed to expression with checked state.

<input type="checkbox" checkbox-change="changeMyValue($checked)">

var checkboxChangeDirective = function($parse) {
@0x3333
0x3333 / prompt_0x3333_setup
Last active September 21, 2017 22:12
Prezto Prompt
#
# Authors:
# Tercio Gaudencio Filho <terciofilho@gmail.com>
#
# Ex:
# USERNAME@HOSTNAME [/FULL/PATH] ✘ $ TIME
function prompt_0x3333_setup {
setopt LOCAL_OPTIONS
unsetopt XTRACE KSH_ARRAYS
@0x3333
0x3333 / README.md
Last active September 27, 2017 17:31
Installing ForkLift version 2 using Cask

ForkLift 2 Cask Install

ForkLift is in version 3, but I have a license for version 2. I want to install ForkLift version 2 using brew cask, if I just run brew cask install forklift it will install version 3.

To install version 2 install the last commit in the cask file forklift.rb for version 2, which is 2.6.6, commit 0bc4d90.

forklift.rb in commit 0bc4d90

@0x3333
0x3333 / README.md
Created August 12, 2015 13:04
Mac OS X - Wallpaper Changer - Swift

Mac OS X - Wallpaper Changer

Swift code to change the Wallpaper for all screens. Currently, it changes only the current spaces' wallpaper. I'm working on a version to change in all spaces.

Usage: WallpaperChanger "/Users/username/SomeFolder/SomePicture.jpg"

@0x3333
0x3333 / README.md
Created March 15, 2018 12:21
Tabulated mount output

Tabulated and sorted mount output

mount | column -t | sort -V

You can create an alias:

alias mountc='mount | column -t | sort -V'
/*
* Copyright (C) 2015 Machinery For Change, Inc.
*/
package com.github.x3333.logging;
import java.text.MessageFormat;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@0x3333
0x3333 / debug.zsh
Created October 25, 2018 19:43
Debug a ZSH Script - Ask for a confirmation before every command is issued
#!/usr/bin/zsh
TRAPDEBUG() {
read -q "?run \"$ZSH_DEBUG_CMD\"? " || setopt errexit
echo > /dev/tty
}
echo "First command"
echo "Second command"
echo "Last command"