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 python2.7 | |
# Depends on oxygen-icon-theme. Change /usr/share/icons/oxygen to your desired theme. | |
import code | |
import gtk | |
import gobject | |
import threading | |
import time | |
import os, sys | |
import signal |
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
/** | |
* ifconjig - readOnly ifconfig for JSON output. | |
*/ | |
#include <arpa/inet.h> | |
#include <sys/socket.h> | |
#include <sys/ioctl.h> | |
#include <net/if.h> | |
#include <net/if_arp.h> |
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
#!/sbin/openrc-run | |
# 2020-08-10: @markizano | |
# Written by inference from https://wiki.gentoo.org/wiki/Handbook:X86/Working/Initscripts | |
# and https://gist.github.com/robinwl/5ec20144364557b83d90 | |
user=${CARBON_USER:-graphite} | |
group=${CARBON_GROUP:-apps} | |
description="An init script for Graphite's carbon-cache daemon." |
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
#!/sbin/openrc-run | |
# 2020-08-10: @markizano | |
# Written by inference from https://wiki.gentoo.org/wiki/Handbook:X86/Working/Initscripts | |
# and https://gist.github.com/chalmerj/1492384 | |
user=${CARBON_USER:-graphite} | |
group=${CARBON_GROUP:-apps} | |
description="An init script for Graphite's carbon-cache daemon." |
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
function aggregateGpus(gpu) { | |
var result = '%name:\n'.replace('%name', gpu.name); | |
result += ' Price (USD): %price\n'.replace('%price', gpu.price); | |
result += ' HashRate (MH/s): %hr\n'.replace('%hr', gpu.hashrate); | |
result += ' Power (W): %power\n'.replace('%power', gpu.power); | |
result += ' $/MH: %dph\n'.replace('%dph', gpu.pricePerHash); | |
result += ' MH/W: %hpw\n\n'.replace('%hpw', gpu.hashPerWatt); | |
print(result); | |
} |
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 python3 | |
import os, sys | |
import time | |
import json | |
import threading | |
from libinput import LibInput, constant | |
from glob import glob |
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 | |
export startlog='ZIL PoW Window Start' \ | |
endlog='ZIL PoW Window End' \ | |
minerproc='/usr/local/share/gminer-2.54/miner' \ | |
screenlog=~/screenlog.0 | |
tail -n0 -F "$screenlog" | \ | |
while read logline; do | |
echo "$logline" | grep -qF "$startlog" && { |
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 dictmerge(target, *args): | |
''' | |
Merge multiple dictionaries. | |
Usage: | |
one = {'one': 1} | |
two = {'two': 2} | |
three = {'three': 3} | |
sum = dictmerge(one, two, three) | |
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
export DATEFORMAT='%F/%R:%S'; | |
export HISTCONTROL=ignoreboth | |
export HISTFILE=$HOME/.bash_history | |
export HISTFILESIZE=-1 | |
export HISTSIZE=81920 | |
export HISTTIMEFORMAT="$DATEFORMAT " | |
export HISTLOG=~/.bash_history.d | |
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:.:~/bin | |
export PROMPT_COMMAND='echo -en "\n\e[36m$?\e[0m; "; history -a; histlog "$(history 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
#!/usr/bin/env python3 | |
import os | |
import sys | |
import yaml | |
def main(target): | |
if not os.path.isdir( target ): | |
print('Could not walk %s. Target is not a directory or doesnt exist.' % target) | |
return 1 |
OlderNewer