This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ksh | |
# | |
USAGE="Usage: dnsbl [-b] ipaddress" | |
set -A RBL_LST "zen.spamhaus.org" "bl.spamcop.net" \ | |
"b.barracudacentral.org" "cbl.abuseat.org" \ | |
"hostkarma.junkemailfilter.com" | |
if [[ $# < 1 || $# > 2 ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Nice prompt with nice colors for git | |
# Colors: master (red), dev (grey), other branches (green) | |
# | |
__set_prompt() { | |
local _RESET="\033[0m\017" # reset color | |
local _MASTER="\033[31m" # red | |
local _DEV="\033[90m" # grey | |
local _BRANCH="\033[32m" # green | |
local ref="$(git symbolic-ref --short HEAD 2>/dev/null)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reload key | |
bind-key R source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded" | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
set -g display-time 5000 | |
set -g display-panes-time 5000 | |
# make tmux display things in 256 colors | |
set -g default-terminal "screen-256color" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ /Library/ | |
+ /Library/Accounts/ | |
+ /Library/Application Support/ | |
+ /Library/Application Support/AddressBook/ | |
+ /Library/Calendars/ | |
+ /Library/Dictionaries/ | |
+ /Library/Fonts/ | |
+ /Library/HomeKit/ | |
+ /Library/Keychains/ | |
+ /Library/Mail/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FileCache(object): | |
use_cache = True | |
def __init__(self, expire=CACHE_EXPIRATION): | |
self._expire = expire | |
def __call__(self, func): | |
"""Simple cache decorator. Cache the values in a file in `/var/tmp`""" | |
@wraps(func) | |
def wrapped_function(*args): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
# | |
# Author: Fred Cirera <[email protected]> | |
# Module: vault-password.py | |
# | |
""" This script requires the ``keyring`` python module | |
Add a [vault] section to your ansible.cfg file, | |
the options are |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Example: | |
# | |
# $ progress.py /tmp/foo.tar | ssh remote tar xf - | |
# [********** ] 446 / 2298 | |
# | |
import os | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# | |
# Dependency: | |
# pip install keyring | |
# | |
# Fred C. http://github.com/0x9900/ | |
# | |
""" | |
Generate a passworg base on the domain name of a website, your | |
userid on this website and a key. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mmap import ACCESS_READ, mmap | |
with open(filename, 'rb') as f, mmap(f.fileno(), 0, access=ACCESS_READ) as mm: | |
for byte in mm: # length is equal to the current file size | |
# Do stuff with byte |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//fldigi macro definition file extended | |
// This file defines the macro structure(s) for the digital modem program, fldigi | |
// It also serves as a basis for any macros that are written by the user | |
// | |
// The top line of this file should always be the first line in every macro | |
// definition file (.mdf) for the fldigi program to recognize it as such. | |
// | |
// | |
// Macro # 1 |