Create file /etc/systemd/system/[email protected]
[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service
import os,pandas | |
for file in os.listdir('./'): | |
if file.endswith('.json'): | |
print'Processing: ', os.path.join('./', file) | |
newfilename = str(file) + ".csv" | |
pandas.read_json(file).to_csv(newfilename, encoding = 'utf-8 |
Create file /etc/systemd/system/[email protected]
[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service
# From: https://apple.stackexchange.com/a/40244 | |
ioreg -c IOPlatformExpertDevice -d 2 |awk '/IOPlatformSerialNumber/ {print $3}' |sed s/\"//g |
#!/bin/bash | |
# A bash script to create a time machine disk image suitable for | |
# backups with OS X 10.6 (Snow Leopard) | |
# This script probably only works for me, so try it at your own peril! | |
# Use, distribute, and modify as you see fit but leave this header intact. | |
# (R) sunkid - September 5, 2009 | |
# | |
# This will create a time machine ready disk image named with your | |
# computer's name with a maximum size of 600GB and copy it to | |
# /Volumes/backup. The image "file" (it's a directory, really) will |
#!/bin/bash | |
while true; do | |
/usr/bin/open -F -a "/Applications/Firefox.app" 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' | |
sleep 50 | |
/usr/bin/open -a "/Applications/Firefox.app" 'https://google.ca' | |
sleep 5 | |
/usr/bin/open -a "/Applications/Firefox.app" 'https://zu.com' |
#! /bin/bash | |
# This is for Mac OSX only. | |
# ============================================= | |
# explanation of arguments used with 'tcpdump': | |
# ============================================= | |
# -y IEEE802_11_RADIO => makes it capture __WIFI__ packets, turns resultant file | |
# into a dump which can be read by aircrack-ng, etc. | |
# | |
# -I => puts interface into monitor mode (required to capture packets) |
#!/bin/bash | |
if [[ $# -ne 1 ]]; then | |
echo "Usage: $(basename $0) user" | |
exit 99 | |
fi | |
HOST=ldap.example.com | |
BASE_DN="dc=example,dc=com" | |
ROOT_DN="cn=admin,${BASE_DN}" |
-- | |
-- Simple script to do unattented reboot of Airport devices. | |
-- Assumptions: all the devices are sequential, with none to skip. | |
-- | |
-- only run this script if it's before 5am. | |
set foo to do shell script "date +%H" | |
set thisHour to foo as number | |
if thisHour < 5 then |
# Copy this file to /etc/systemd/system/xvfb.service | |
# Then execute: | |
# systemctl enable /etc/systemd/system/xvfb.service | |
# systemctl start xvfb.service | |
[Unit] | |
Description=X Virtual Frame Buffer Service | |
After=network.target | |
[Service] |
#!/bin/bash | |
server=`hostname` | |
timestamp=`date +%s` | |
mail_subject="${1-"$timestamp"} ($server)" | |
mail_address=${2-"[email protected]"} | |
mail_message="/tmp/$timestamp.message" | |
mail_program="/bin/mail" | |
echo "Sending test mail to $mail_address, with subject \"$mail_subject\"" |