This file contains 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
FROM ubuntu:latest | |
MAINTAINER Ben Tomasik < btomasik [at] telkonet {dot} com> | |
ENV ES_DEB_URLROOT https://download.elasticsearch.org/elasticsearch/elasticsearch/ | |
ENV ES_DEB_FILE elasticsearch-0.90.7.deb | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN apt-get update && apt-get upgrade | |
##### |
This file contains 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 | |
cd $(dirname $0) | |
LOG_PREFIX=build-static | |
LOG_STDOUT=${LOG_PREFIX}.stdout | |
LOG_STDERR=${LOG_PREFIX}.stderr | |
REMOVE_TARGET_DIR=n | |
SOURCE_MAKE_CONF=y |
This file contains 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
### | |
# Marking the drive at enclosure 32, slot 0, on adapter 0 as bad and preparing for removal | |
### | |
# 1) Tell the controller that we'd like to take this disk offline | |
MegaCli64 -PDOffline -PhysDrv [32:0] -a0 | |
# 2) Tell the controller that this disk will be missing and we're ok with that. | |
MegaCli64 -PDMarkMissing -PhysDrv [32:0] -a0 | |
# 3) Tell the controller to sping down the disk for removal |
This file contains 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
<?php | |
$db = @mysql_connect(HOST, USER, PASS); | |
$newRecord = array( | |
'Name' => 'tomislacker', | |
'Email' => '[email protected]' | |
); | |
$keys = array_map( |
This file contains 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 | |
watch --color -tn 1 "( printTitle.sh -Nt$(date +'%Y-%m-%d_%H:%M:%S') ; echo ; printTitle.sh -c: -Ntgit-status ; git status ; echo ; printTitle.sh -c: -Ntgit-branches ; git branch -a -v | cut -c -$(($(tput cols)-2)) ; echo ; printTitle.sh -c: -Ntgit-remotes; git remote -v show) | ccze -A" |
This file contains 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 | |
DEFAULT_SCALE=4 | |
getMicrotime () | |
{ | |
date +%s%N | |
} | |
microElapse () |
This file contains 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 python | |
import cv | |
import sys | |
class Target: | |
def __init__(self): | |
# CaptureFromFile or CaptureFromCAM | |
if sys.argv[1] == '-': |
This file contains 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
def get_gz_size(gzipfile): | |
f = open(gzipfile, "rb") | |
if f.read(2) != "\x1f\x8b": | |
raise IOError("not a gzip file") | |
f.seek(-4, 2) | |
return struct.unpack("<i", f.read())[0] |
This file contains 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 | |
### | |
# dd emulator | |
### | |
BYTES_PER_RECORD=512 | |
BYTES_TOTAL=1020837888 | |
BYTES_RATE=$((10*1024*1024)) | |
BYTES_RATE_FUDGE=$((1*1024*1024)) |
This file contains 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 python | |
import cv | |
import sys | |
import argparse | |
import os.path | |
import time | |
import math |
OlderNewer