Skip to content

Instantly share code, notes, and snippets.

@miracle2k
miracle2k / jsonalchemy.py
Last active March 26, 2021 05:19 — forked from dbarnett/jsonalchemy.py
Support Raw json objects, OrderedDict, dates.
import json
import sqlalchemy
from sqlalchemy import UnicodeText
from sqlalchemy.ext.mutable import Mutable
from datetime import datetime
from collections import OrderedDict
__all__ = ('JSON', 'JsonRaw')
@9point6
9point6 / ssh-retry.sh
Last active April 22, 2023 08:44
Keep retrying SSH connection until success (Useful for waiting for VMs to boot)
#!/usr/bin/env bash
# Check we've got command line arguments
if [ -z "$*" ] ; then
echo "Need to specify ssh options"
exit 1
fi
# Start trying and retrying
((count = 100))
@masci
masci / telnet and wait
Created September 30, 2014 20:35
using AppleScript to start a telnet console and wait for it to finish
#!/bin/sh
osascript <<EOF
tell application "Terminal"
activate
set _tab to do script "telnet 127.0.0.1 2001 ; exit"
delay 1
repeat while _tab exists
delay 1
end repeat