Skip to content

Instantly share code, notes, and snippets.

View stevearc's full-sized avatar

Steven Arcangeli stevearc

View GitHub Profile
[app:main]
use = egg:pypicloud
filter-with = proxy-prefix
pyramid.reload_templates = False
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en
@stevearc
stevearc / foxdot_server.py
Created November 27, 2017 03:17
Headless server for FoxDot
#!/usr/bin/env python
from __future__ import print_function
import argparse
import socket
from contextlib import closing
from threading import Thread, Lock
DEFAULT_PORT = 7088
_env = None
lock = Lock()
#!/usr/bin/env bash -e
get_p4_url() {
local os=$(uname -o)
if [[ "$os" =~ Linux ]]; then
echo "http://cdist2.perforce.com/perforce/r14.2/bin.linux26x86_64/p4"
else
echo "http://cdist2.perforce.com/perforce/r14.2/bin.macosx105x86/p4"
fi
}
@stevearc
stevearc / gen_roster.py
Last active January 11, 2020 22:53
Script for generating a salt-ssh roster from different cloud providers
#!/usr/bin/env python
import os
import argparse
import yaml
class IRosterFactory(object):
""" Interface for objects that can generate a Salt roster """
@stevearc
stevearc / omnishell.py
Last active August 17, 2023 08:05
This is a cute little script for easily running shell commands across many servers using salt.
#!/usr/bin/env python
"""
This is a cute little script for easily running shell commands across many
servers using salt.
Copyright (c) 2013 Steven Arcangeli
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in