Skip to content

Instantly share code, notes, and snippets.

View mwicat's full-sized avatar

Marek Wiewiorski mwicat

View GitHub Profile
#!/bin/bash
set -o nounset
set -o errexit
sudo apt-get install git xz-utils build-essentials curl cpio
cd ~/src
git clone https://github.com/patjak/facetimehd-firmware.git
cd facetimehd-firmware
make
#!/bin/bash
set -o nounset
set -o errexit
app="$1"
osascript <<EOF
tell application "Finder"
if application "$app" is not running or process "$app" is not visible then
#!/bin/bash
set -euo pipefail
innobackupx ()
{
hostname="$1"
echo "xbstream $hostname"
xbstream_path="/database/xtrabackup/${hostname}-xtrabackup.xbstream-$(date -I)"
log_path="/database/log/${hostname}-$(date -I).log"
from collections import Counter
import psutil
import pandas as pd
import matplotlib.pyplot as plt
def gen_rows():
for p in psutil.process_iter():
input {
file {
path => "/home/testuser/work/sandbox/awslog/*.log"
type => "elb"
start_position => "beginning"
sincedb_path => "log_sincedb"
}
}
filter {
#!/bin/bash
alias sox='/opt/local/bin/sox'
while [ $# -gt 0 ]; do
[ ! -f "$1" ] && { echo "Invalid path: $1" >&2; continue; }
clean_path=$(printf '%s' "$1" | sed 's/.[^.]*$//')
for bits in 8 16 24 32; do
bits_mod=$(($bits / 8))
for channels in 1 2; do
<ValhallaUberMod pluginVersion="1.0.2" presetName="SSTBuildingBlock" Mix="1" Depth="0.648000002" StereoWidth="0.542500019" Delay="0.271200001" Feedback="0" Spread="1" Slope="0.5" Skew="0.0879999995" Random="1" TapGain="0.5" Diffusion="1" DiffSize="0.0877550989" DiffModRate="0.0490490496" DiffModDepth="0.5" LowCut="0.0502512567" HighCut="0.287939698" SpatialXover="0.145728648" DetuneRate="0.133133128" DetuneDepth="0.5" VibratoRate="0.258145362" VibratoDepth="0.151999995" OverMod="0" DriveInGain="0" DriveOutGain="1" DriveNoiseGain="0.333333343" FeedbackRotate="0.5" SmoothingTime="0.0990990996" ColorMode="0" DelaySync="0" type="0.333333343" DiffEnable="0" Drive="1" DrivePrePost="0" Speed="0" InputPan="0.25" ShiftFreq="0.100000001"/>
python -c '
from __future__ import print_function
import socket
import sys
addr = sys.argv[1]
port = int(sys.argv[2])
ipaddr = socket.gethostbyname(addr)
#!/usr/bin/env python3
import os
import sys
import time
import signal
signum_to_name = {sig.value: sig.name for sig in signal.Signals}
def receive_signal(signum, stack):
#!/usr/bin/env python
from __future__ import print_function
import sys
import time
try:
import socketserver
except ImportError:
import SocketServer as socketserver