Skip to content

Instantly share code, notes, and snippets.

View dandye's full-sized avatar

DanDye dandye

View GitHub Profile
@dandye
dandye / TAXII-1.1.postman_collection.json
Created October 27, 2016 02:45 — forked from jtschichold/TAXII-1.1.postman_collection.json
Simple Postman Collection for TAXII 1.1 Requests
{
"variables": [],
"info": {
"name": "TAXII-1.1 (0.1)",
"_postman_id": "f355c2a2-5d3e-6f5b-f957-afe4d5646d7a",
"description": "Simple collection of TAXII 1.1 requests.\nYou need an environment with the following keys to run this:\n- hostname: hostname of the TAXII server\n- collection: name of the collection to poll (needed only for Poll Request)\n\nDiscovery request points to {{hostname}}/taxii-discovery-service\n\nCollection Information Request points to {{hostname}}/taxii-collection-management-service\n\nPoll Request to {{hostname}}/taxii-poll-service",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
@szurcher
szurcher / centos7.json
Last active September 12, 2021 09:56
CentOS 7 Minimal kickstart file and Packer config.json for building a vagrant virtualbox base box with guest additions installed. Based off of https://www.centosblog.com/centos-7-minimal-kickstart-file/
{
"builders": [{
"type": "virtualbox-iso",
"guest_os_type": "RedHat_64",
"iso_url": "[YOUR ISO PATH HERE]",
"iso_checksum": "[YOUR ISO CHECKSUM HERE]",
"iso_checksum_type": "sha256",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "1500s",
@cpswan
cpswan / cloud-localds
Last active December 29, 2016 18:44
cloud-localds from Ubuntu 13.04 - place in /usr/bin on older dists (e.g. 12.04)
#!/bin/bash
VERBOSITY=0
TEMP_D=""
DEF_DISK_FORMAT="raw"
DEF_FILESYSTEM="iso9660"
error() { echo "$@" 1>&2; }
errorp() { printf "$@" 1>&2; }
fail() { [ $# -eq 0 ] || error "$@"; exit 1; }
@smoser
smoser / ubuntu-cloud-virtualbox.sh
Last active April 2, 2024 21:07
example of using Ubuntu cloud images with virtualbox
## Install necessary packages
$ sudo apt-get install virtualbox-ose qemu-utils genisoimage cloud-utils
## get kvm unloaded so virtualbox can load
$ sudo modprobe -r kvm_amd kvm_intel
$ sudo service virtualbox stop
$ sudo service virtualbox start
## URL to most recent cloud image of 12.04
$ img_url="http://cloud-images.ubuntu.com/server/releases/12.04/release"
@tobyhede
tobyhede / postsql.sql
Created May 17, 2012 03:08
PostgreSQL as JSON Document Store
-- PostgreSQL 9.2 beta (for the new JSON datatype)
-- You can actually use an earlier version and a TEXT type too
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8
-- Inspired by
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html
-- http://ssql-pgaustin.herokuapp.com/#1
-- JSON Types need to be mapped into corresponding PG types
--
@abhishekctn
abhishekctn / bootstrap_salt_cloudinit.rst
Created April 29, 2012 03:39 — forked from akoumjian/bootstrap_salt_cloudinit.rst
Bootstrapping Salt on Linux EC2 with CloudInit

Boostrapping Salt on Linux EC2 with Cloud-Init

Salt is a great tool for remote execution and configuration management, however you will still need to bootstrap the daemon when spinning up a new node. One option is to create and save a custom AMI, but this creates another resource to maintain and document.

A better method for Linux machines uses Canonical's CloudInit to run a bootstrap script during an EC2 Instance initialization. Cloud-init takes the user_data string passed into a new AWS instance and runs it in a manner similar to rc.local. The bootstrap script needs to:

  1. Install Salt with dependencies
  2. Point the minion to the master
@joelverhagen
joelverhagen / README.md
Created February 12, 2012 02:14
Jekyll YouTube Embed Plugin

This is a plugin meant for Jekyll.

Example use:

Easily embed a YouTube video. Just drop this file in your _plugins directory.

{% youtube oHg5SJYRHA0 %}
@oeon
oeon / bulk-shp2pgsql
Created February 17, 2011 00:22
batch upload folder of shapefiles which are all in same .prj to PostGIS database
#!/bin/bash
FILES=$(ls *.shp | sed 's/\..\{3\}$//');
for FILE in $FILES
do
shp2pgsql -s 4326 -I -k ${FILE} gis.${FILE} | psql -d HSIP
done