Skip to content

Instantly share code, notes, and snippets.

View CrackerJackMack's full-sized avatar

Kevin Landreth CrackerJackMack

View GitHub Profile
@darktable
darktable / app.yaml
Created March 16, 2011 19:10
GAE: App.yaml designed for serving a static site on Google App Engine (Python). Copy your static html and files into a folder called "static" next to app.yaml. Contains a bunch of mimetype declarations from html5boilerplate's .htaccess. May not be neces
application: you-app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
handlers:
- url: /(.*\.(appcache|manifest))
mime_type: text/cache-manifest
{% macro postconf(key, value) -%}
postconf-{{ key }}:
cmd:
- run
- name:
- postconf -e {{ key }}='{{ value }}'
- unless: test "x$(postconf -h {{ key }} )" = 'x{{ value }}'
- require:
- pkg: postfix
@robinsmidsrod
robinsmidsrod / _INSTALL.md
Last active June 16, 2024 09:00
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

package main
import (
"github.com/AllenDang/w32"
"io"
"os"
"unsafe"
"errors"
"fmt"
"syscall"
@robinsmidsrod
robinsmidsrod / _README.md
Last active May 11, 2024 00:20
Embedded iPXE menu to choose which network adapter to boot from (autodetects up to 10 adapters)

Go into your git checkout folder of ipxe.

Save the below file as nic-menu.ipxe.

Build iPXE like this:

cd src && make EMBED=../nic-menu.ipxe && cd ..

Requirements: current iPXE as of 2013-08-01 (for proper behavior of autoboot with a network device specified, netX feature, PCI vendor/device ID display and inc command)

@justincampbell
justincampbell / after.sh
Created March 1, 2013 17:45
Jenkins + GitHub Commit Status API
if [[ $BUILD_STATUS == "success" ]]
then
export STATUS="success"
else
export STATUS="failure"
fi
curl "https://api.github.com/repos/justincampbell/my_repo/statuses/$GIT_COMMIT?access_token=abc123" \
-H "Content-Type: application/json" \
-X POST \
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.3" jmeter="2.8 r1393162">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="eventlet + multiprocessing" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@plentz
plentz / nginx.conf
Last active July 17, 2024 09:16
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@underscorephil
underscorephil / archive_transaction.py
Created November 13, 2013 16:22
Capture an image for all block devices on a CCI
client = SoftLayer.Client()
cci = SoftLayer.CCIManager(client)
instance = cci.get_instance(cci_id)
disks = filter(lambda x: x['blockDevices'] != 1, instance['blockDevices']) # remove the swap disk
client['Virtual_Guest'].createArchiveTransaction(
"display name",
disks,
"Description here - My first capture",
id=cci_id,
)
#!/usr/bin/env python
"""
Generates graphs of VLANs and connected hardware/CCIs from data in the
SoftLayer API.
"""
import argparse
import time
try:
from pydot import Dot, Node, Edge