As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
<?php | |
/* | |
Convert an arbitrarily large number from any base to any base. | |
string convBase(string $numberInput, string $fromBaseInput, string $toBaseInput) | |
$numberInput number to convert as a string | |
$fromBaseInput base of the number to convert as a string | |
$toBaseInput base the number should be converted to as a string | |
examples for $fromBaseInput and $toBaseInput |
#! /bin/sh | |
# | |
# Copyright (c) 2013-2014 Bryan Drewery <bdrewery@FreeBSD.org> | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# 1. Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
Simple way to setup an arm chroot for building packages for your arm devices. This is an alternative to cross-compiling where you are limited to only linking against the libs in your toolchain.
You can store the chroot wherever you like. I choose to store it in a disk-image which I mount to my filesystem.
#!/bin/bash | |
echo "Executing /etc/qemu-ifdown" | |
echo "Bringing TAP interface down" | |
ifconfig $1 down | |
echo "Removing interfaces" | |
ifconfig bridge0 deletem en1 deletem $1 | |
echo "Bring down bridge" | |
ifconfig bridge0 down | |
echo "Removing bridge" | |
ifconfig bridge0 destroy |
-- Script to set sound output - "Internal Speakers" hardcoded as I just keep multiple scripts for each output source (e.g. Internal Speakers, Airplay, bluetooth ) and use it with a quicklaunch app such as quicksilver. | |
-- Based off of Pierre L's answer in https://discussions.apple.com/thread/4629093?tstart=0 , which includes a selection dialog | |
set asrc to "Internal Speakers" | |
tell application "System Preferences" | |
reveal anchor "output" of pane id "com.apple.preference.sound" | |
activate | |
zfs list -H -o name -t snapshot | xargs -n1 zfs destroy |
# This script work on any system using systemd as the init process. | |
# It works on Debian/Raspbian Jessie. | |
# If you have Debian/Rapbian Wheezy and want to use this script with systemd | |
# follow the information here : https://wiki.debian.org/systemd | |
# To easily download, install and set at startup: | |
# wget -O /tmp/download https://gist.github.com/biddster/9a700b0974f3a7b7a34e/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/systemd/system/ && sudo systemctl --reload-daemon && sudo systemctl enable Node-RED | |
# To consult the log : journalctl -u Node-RED | |
[Unit] |
#!/bin/bash | |
######################################################################## | |
# LIGHTS OUT FOR LINUX (lofl) # | |
# This script suspends the computer if it's idle for a given period of # | |
# time. It monitors network activity, logged on users and CPU load. # | |
######################################################################## | |
# maximum packet count per minute – usually not more than 12-15 | |
net_threshold=12 |