This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## @author Jay Goldberg | |
## @email [email protected] | |
## @license Apache 2.0 | |
## @description Watch an IQeye camera HTTP stream for motion events and echo to the console | |
## @usage camwatch.sh <list of IQeye camera URLS> | |
#======================================================================= | |
# http://stackoverflow.com/questions/10862970/inter-process-communication-without-fifos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"strconv" | |
) | |
import "strings" | |
func is_ipv4(host string) bool { | |
parts := strings.Split(host, ".") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"labix.org/v2/mgo" | |
"labix.org/v2/mgo/bson" | |
"time" | |
) | |
type Person struct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#title :timelapse_create.bash | |
#description :scans a directory for JPEGs and makes a timelapse .mov | |
#author :"Jay Goldberg" <[email protected]> | |
#url : | |
#license :Apache 2.0 | |
#requirements :avconv | |
#usage :./timelapse_create.bash [all,hourly,daily] | |
#======================================================================= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## @author Jay Goldberg | |
## @email [email protected] | |
## @license Apache 2.0 | |
## @description Run web browser in a cgroup | |
## @usage cgroup-chrome | |
#======================================================================= | |
MB=${$1:-1024} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## @author Jay Goldberg | |
## @email [email protected] | |
## @license Apache 2.0 | |
## @description Find all executables in $PATH that are likely XWindows (GUI) applications | |
## @usage findXapps.sh | |
#======================================================================= | |
# a substring of the dynamically linked library that determines if the exe is an X app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## @author Jay Goldberg | |
## @email [email protected] | |
## @license Apache 2.0 | |
## @description Determine if a file is a symlink or hardlink to a particular file | |
## Example, "is this file a hard or softlink to Busybox? | |
## @usage source it, then IsLinked <possible_link> <target> | |
#======================================================================= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## @author Jay Goldberg | |
## @email [email protected] | |
## @license Apache 2.0 | |
## @description Implement pgrep on platforms that don't have it | |
## @usage source it, then pgrep <processname> | |
#======================================================================= | |
pgrep() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## @author Jay Goldberg | |
## @email [email protected] | |
## @license Apache 2.0 | |
## @description scans above/below given port | |
## @usage smartportscan.sh <text file with "<host> <port>" lines | |
#======================================================================= | |
#TODO(JSON output mode using jq) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## @author Jay Goldberg | |
## @email [email protected] | |
## @license Apache 2.0 | |
## @description constrains an execution to memory and cpu limits using cgroups | |
## @usage heifer.sh <cpushares_limit> <mem_limit> <command -args> | |
## @require cgcreate | |
## @require cgexec | |
## @require sudo |
OlderNewer