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
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <signal.h> | |
static const char* led_file = "/sys/devices/platform/leds-gpio/leds/tp-link:blue:system/brightness"; | |
FILE *led_fh; | |
void cleanup(int); |
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 perl | |
# This script takes two files with profiling information about branch | |
# misprediction as input. It outputs the percentage of branch | |
# mispredictions per instruction address | |
use strict; | |
use warnings; | |
my $stats = compute_branch_misprediction_stats(); |
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 | |
PUPPET_HOST="ebola.int80.biz" | |
function set_hostname { | |
echo "Hostname: " | |
read hostname | |
echo "$hostname" > /etc/hostname | |
echo "127.0.1.1 $hostname" >> /etc/hosts | |
hostname "$hostname" |
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
# Reports replication lag in seconds | |
# For use with Postgresql and repmgr | |
# Usage: -c lag_seconds_threshold -n standby_node_id | |
# Sample output: REPMGR OK - Replication apply time lag: 1 seconds, 11 kB | |
package MyApp::Monitor::ReplicationLag; | |
use Moose; |
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 perl | |
# Migrate PT stories to GitHub issues | |
use Moose; | |
use WWW::PivotalTracker qw/ | |
add_note |
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
How computers work | |
================== | |
Most people on the planet directly interact with computers on a daily | |
basis. They may be fooling around on their cell phone, writing a paper | |
for their homework, or playing video games. Despite the ubiquity | |
of digital computing devices, there is an astonishingly small number of | |
people who are familiar with the inner workings of these devices. Not | |
only that, but due to the fact most people think of computers in |
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 | |
# This script fetches and builds libx264, libav, rtmpd and their dependencies. | |
# you may have to add /usr/local/lib to /etc/ld.so.conf | |
# BASEDIR = build directory (default current dir) | |
# PREFIX = install directory (default /usr/local) | |
if [ -z "$BASEDIR" ]; then | |
BASEDIR=`pwd` | |
fi |
NewerOlder