This file contains 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
# jun/12/2016 10:08:13 by RouterOS 6.35.2 | |
# software id = NS6T-J47L | |
# | |
/interface bridge | |
add name=bridge-guests | |
add name=bridge-media | |
add name=bridge-phones | |
add name=bridge-storage | |
add name=bridge-users | |
add name=bridge-vms |
This file contains 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
# Fetch and fill config | |
mikrotik_vpn_config=$(curl https://gist.github.com/elmariofredo/7232556/raw/VPN-L2TP-IPSEC.mikrotik \ | |
| sed -e ' | |
s/IPSEC_PEER_SECRET/somesecret/g; | |
s/USER1_NAME/mario/g; | |
s/USER1_PASS/somepass/g; | |
s/IP_RANGE/172.16.24.100-172.16.24.200/g; | |
s/DNS_SERVER/172.16.22.1/g; | |
s/LOCAL_ADDRESS/172.16.22.1/g; | |
s/WINS_SERVER/172.16.22.1/g') |
This file contains 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 sh | |
# Download lists, unpack and filter, write to stdout | |
curl -s https://www.iblocklist.com/lists.php \ | |
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| xargs wget -O - \ | |
| gunzip \ | |
| egrep -v '^#' |
This file contains 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
altscreen on | |
hardstatus on | |
hardstatus alwayslastline | |
startup_message off | |
termcapinfo xterm ti@:te@ | |
hardstatus string " %{= kC}%-w%{.rW}%n %t%{-}%+w %=%{..C} %H %{..C} %m/%d " | |
defscrollback 1000 | |
# Bind C-a v to copy buffer to Mac OS X clipboard. | |
bind v eval "writebuf" "exec sh -c 'pbcopy < /tmp/screen-exchange'" |
This file contains 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 | |
#coding: utf-8 | |
from optparse import OptionParser | |
from datetime import date, datetime | |
from pwd import getpwnam | |
import unidecode | |
from libs.script_utils import get_email_logger | |
import getpass |
This file contains 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
# Add multimedia source | |
echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list | |
echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list | |
apt-get update | |
apt-get install deb-multimedia-keyring # if this aborts, try again | |
apt-get update | |
# Go to local source directory | |
cd /usr/local/src |
This file contains 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
# Bash completion script for brew(1) | |
# | |
# To use, add the following to your .bashrc: | |
# | |
# . $(brew --repository)/Library/Contributions/brew_bash_completion.sh | |
# | |
# Alternatively, if you have installed the bash-completion package, | |
# you can create a symlink to this file in one of the following directories: | |
# | |
# $(brew --prefix)/etc/bash_completion.d |
This file contains 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
# Copyright (c) 2011, Xabier (slok) Larrakoetxea | |
# Copyright (c) 2011, Iraide (Sharem) Diaz | |
# | |
# 3 clause/New BSD license: | |
# opensource: http://www.opensource.org/licenses/BSD-3-Clause | |
# wikipedia: http://en.wikipedia.org/wiki/BSD_licenses | |
# | |
#----------------------------------------------------------------------- | |
# This script allows to upload to Fileserve with FTP various files at the same time | |
# |
This file contains 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
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail | |
# Make sure you have IMAP enabled in your gmail settings. | |
# Right now it won't download same file name twice even if their contents are different. | |
import email | |
import getpass, imaplib | |
import os | |
import sys | |
detach_dir = '.' |
This file contains 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
import os, cmd, sys, re, glob, os.path, shutil, zipfile, tarfile, gzip | |
# You can skip over reading this class, if you like. | |
# It's an implementation of mine of the bash parser in pure python | |
# This has advantages over shlex, glob, and shlex->glob in that it expects | |
# the strings to represent files from the start. | |
class BetterParser: | |
def __init__(self): | |
self.env_vars = {"$HOME": os.path.expanduser('~')} |
NewerOlder