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
<# | |
Create Unix VM's. | |
PREREQUISITES: | |
- A VM that has been installed with an OS that supports cloud-init | |
- cloud-init is installed on the vm | |
How it works: | |
- Asks for a bunch of parameters | |
- Creates a disk from parent vhdx for speed |
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 | |
# https://gist.github.com/koenpunt/40c0b042c453a1add0e8 | |
# | |
# Check if the user is in the right group | |
# and afterwards retrieve the SSH public key from LDAP | |
# Logs directly in Syslog | |
# requires ldap-utils | |
# | |
# sshd_config for OpenSSH 6.2 or higher: | |
# |
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 sys,os | |
import curses | |
def draw_menu(stdscr): | |
k = 0 | |
cursor_x = 0 | |
cursor_y = 0 | |
# Clear and refresh the screen for a blank canvas | |
stdscr.clear() |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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
("urn:schemas:httpmail:read" = 0 OR "http://schemas.microsoft.com/mapi/proptag/0x10900003" > 1 OR | |
%today("urn:schemas:httpmail:datereceived")% ) |
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 | |
import subprocess | |
from multiprocessing import Pool | |
def main(): | |
fileList = [] | |
for root, dirs, files in os.walk("."): | |
for file in files: | |
full_file = os.path.abspath("{0}\\{1}".format(root, file)) |
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 cdpwavefile | |
import ftplib | |
import socket | |
from datetime import date, timedelta | |
import os | |
import io | |
import sys | |
import time | |
import pyprind |
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
from pydub import AudioSegment | |
from pydub import playback as player | |
import math | |
raw_promo = AudioSegment.from_mp3("FreshA7__1500.mp2") | |
tag = AudioSegment.from_wav("FA_tag2.wav") | |
tag_adjust = round(20 * math.log10(float(raw_promo.rms) / tag.rms), 1) | |
tag = tag + tag_adjust |
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 sseclient | |
import requests | |
import getpass | |
def main(): | |
print "hello world" | |
# This uses the code you get from the app | |
# fields = {'code': code, |
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 signal | |
import pyuv | |
def on_fs_event(evt_handle, filename, events, error): | |
print evt_handle.filename, events | |
def handler_closing(handle): | |
print "Closing", handle | |
handle.close(handler_closed) |
NewerOlder