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
#!/Users/username/Documents/python/projectname/env/bin/python | |
# change username and projectname above to match yours - the path must match the path in YOUR virtualenv | |
""" | |
edit line 1 to match what YOU get when you are in YOUR virtualenv and type: | |
which python | |
# NO SPACES in first 3 chars in line 1: #!/ | |
# make sure env is activated! |
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 python3 | |
# Requires python3 and pexpect_serial | |
# Tha script changes root password to toor1984 and enables dropbear | |
# Should work with dgnwg05lm (lumi.gateway.mieu01) | |
import sys | |
import serial | |
import argparse | |
from pexpect_serial import SerialSpawn | |
parser = argparse.ArgumentParser() |
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
# API | |
GULF_AIR = 'https://www.timaticweb.com/cgi-bin/tim_website_client.cgi?SpecData=1&VISA=&page=visa&PASSTYPES=PASS&NA=CN&AR=00&DE=US&user=STAR&subuser=STARB2C' | |
STAR_ALLIANCE = 'https://www.timaticweb.com/cgi-bin/tim_website_client.cgi?SpecData=1&VISA=&page=visa&PASSTYPES=PASS&NA=CN&AR=00&DE=US&user=GF&subuser=GFB2C' | |
KLM = 'https://www.timaticweb.com/cgi-bin/tim_website_client.cgi?SpecData=1&HEALTH=1&VISA=1&NA=AT&EM=AT&DE=AU&PASSTYPES=PASS&user=KLMB2C&subuser=KLMB2C' | |
# Web | |
AIR_BIRLIN = 'http://www.timaticweb.com/cgi-bin/login_website.cgi?user=MALLORCA&subuser=ABCUST&password=SHUTTLE' | |
EMIRATES = 'http://www.emirates.com/english/plan_book/essential_information/visa_passport_information/find_visa_requirements/visa_passport_information_results.aspx?NC=AR&NV=Argentina&DC=AT&DV=Austria&h=79fb1336bcc87035c550b97e3825699d8667b952' |
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
--- | |
- hosts: all | |
gather_facts: no | |
tasks: | |
- name: Create a virtual machine on given ESXi hostname | |
vmware_guest: | |
hostname: "{{ vcenter_address }}" | |
username: "{{ domain_user }}" | |
password: "{{ domain_pass }}" |
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
#!/bin/bash -x | |
# Requered tools: cuetools, shntool, id3v2, vorbis-tools, lame | |
# | |
LAMEOPTS="-b 320 --quiet" | |
OGGOPTS="-b 320 --quiet" | |
usage () { | |
echo Usage: "$(basename $0)" "-f /path/to.flac -s /path/to.cue -e mp3|ogg" |
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 hashlib | |
import os | |
import argparse | |
import re | |
def make_hash(filename): | |
with open(filename, 'rb') as afile: | |
hasher = hashlib.md5() | |
buf = afile.read(6553600) | |
while len(buf) > 0: |
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
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |