Skip to content

Instantly share code, notes, and snippets.

View withinboredom's full-sized avatar
🏠
Working from home

Rob Landers withinboredom

🏠
Working from home
View GitHub Profile
@withinboredom
withinboredom / .config
Created February 21, 2017 17:12
Linux .config
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.9.10-gentoo Kernel Configuration
#
#
# Gentoo Linux
#
CONFIG_GENTOO_LINUX=y
CONFIG_GENTOO_LINUX_UDEV=y
@withinboredom
withinboredom / Dockerfile
Created December 7, 2016 07:17
WordPress plugin
FROM wordpress:4.6.1-php5.6-apache
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.idekey=bonkers" >> /usr/local/etc/php/conf.d/xdebug.ini
@withinboredom
withinboredom / pirate.sh
Last active July 19, 2016 13:52
Pi baker
#!/usr/bin/env bash
sudo passwd pirate
sudo apt-get remove -y docker-hypriot docker-compose hypriot-cluster-lab
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y nfs-client make
echo "10.0.0.4:/var/nfs /var/nfs nfs auto,noatime,nolock,bg,nfsvers=4 0 0" | sudo tee -a /etc/fstab
sudo mkdir /var/nfs
sudo mount -a
sudo fallocate -l 2G /swapfile
echo "hello world"
@withinboredom
withinboredom / deploy-meteor-azure.ps1
Created November 26, 2015 02:43
Deploy meteor app to Azure Website.
# --------------------------
# Leadbox Meteor deployment script for Azure
# by kellerman@leadbox.ca
# Version: 0.3
# --------------------------
# Please run this script on root folder of your meteor app
# ---------------------------
# Prerequisites:
# --- Visual Studio with C++ installed
# --- Node 0.12.7
function getAgents() {
getIp "nginx"
echo "$dockerip www.thecassinagroup.dev" >> /etc/hosts
retry=10
while [ true ]
do
retry=$(expr $retry - 1)
if [ "$retry" == "0" ]
then
echo "Unable to get agent subdomains, this might be a missing or incorrect hosts entry"
@withinboredom
withinboredom / proc.php
Last active October 14, 2015 19:57
processes in php
<?php
while (count($standby) > 0) {
if (count($running) < $threads_per_second - 1) {
$item = array_shift($standby);
if ($item['attempts'] < $item_attempts) {
array_unshift($running, $item);
$spawned++;
echo "Processing " . ++$this->total_count . ": " . $running[0]['code'] . "\n";
//spawn off a child
@withinboredom
withinboredom / benchmark.html
Last active August 29, 2015 14:22
boomquery benchmark
<html>
<head>
<style>
.lg {
background-color: blue;
height: 20px;
display: inline-block;
border: 1px solid black;
}
.sm {
@withinboredom
withinboredom / iframe-scraper.js
Last active August 29, 2015 14:20
a dumb js scraper using iframes
(function() {
var items = [];
window.inventory = [];
window.errors = [];
Array.prototype.clean = function(deleteValue) {
for (var i = 0; i < this.length; i++) {
if (this[i] == deleteValue) {
this.splice(i, 1);
@withinboredom
withinboredom / winner.js
Last active August 29, 2015 14:18
Winning Auctions
(function() {
var checkBid = true;
// run a function if the bid button is
var isButtonEnabled = function(callback) {
console.log('checking for new bids');
// if the place bid button is not disabled and we are ok to check a bid
if (!$('.place-bid').hasClass('disabled') && checkBid) {
// make it so we won't place a bid twice
checkBid = false;