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/sh | |
# ln -s /tmp /home/bitcoin/.AMDOverdriveCtrl for better usb usage (no need to individually sync as well) | |
echo "sync..." | |
sync # one time only | |
echo "doing 5870 gigabyte" | |
rm -f /home/bitcoin/.AMDOverdriveCtrl/default.ovdr >/dev/null 2>&1 | |
cp /home/bitcoin/AMDODCfiles/5870-gigabyte.ovdr /home/bitcoin/.AMDOverdriveCtrl/default.ovdr |
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 | |
RET=`/usr/local/bin/bitcoind --rpcconnect listtransactions` | |
RETCNT=`echo ${RET}|php -r '$x = file_get_contents("php://stdin");$a=json_decode($x);echo count($a);'` | |
LASTCNT=`cat ~/gen-check.last 2>/dev/null` | |
if [ "$LASTCNT" == "" ]; then | |
LASTCNT=0 | |
fi | |
if [ $RETCNT -gt $LASTCNT ]; then | |
echo "sound the alarm, we have transactions" | |
echo "`date` ${RET}" | sendemail -q -f from@gmail.com -t to@gmail.com -u "BITCOIN TRANSACTIONS!" -s smtp.gmail.com:587 -o tls=auto -xu from@gmail.com -xp password-of-from-gmail |
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/awk -f | |
function init() { | |
# allow max 50 fields | |
for(i=0;i<50;i++) { | |
last_data[i][""] = ""; | |
split("", last_data[i]); # make it an array | |
} | |
} | |
function dump() { |
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
import ( | |
"bufio" | |
"context" | |
"io" | |
) | |
type CancelableScanner struct { | |
*bufio.Scanner | |
data chan string | |
err chan error |
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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"os/exec" | |
"strings" |
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
# Put this in ~/.bash_profile | |
# https://gist.github.com/disq/42459b522836b25f30469b3acb5500bf | |
gcd() { | |
if [[ "$1" == "" || "$2" != "" ]]; then | |
echo "Usage: gcd <dir in gopath>" | |
return 1 | |
fi | |
FINDIN=${GOPATH}/src |
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/sh | |
RET=`DISPLAY=:0 aticonfig --odgc --adapter=all` | |
ZEROCNT=`echo ${RET}|grep GPU|grep "0%"|wc -l` | |
if [ $ZEROCNT -gt 0 ]; then | |
if [ -e ~/gpu-monitor.stop ]; then | |
echo "$ZEROCNT gpu still idle" | |
exit 0 | |
fi | |
sleep 10 | |
RET=`DISPLAY=:0 aticonfig --odgc --adapter=all` |
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
# | |
# Generic Go project makefile defaults file | |
# | |
# Usage: | |
# | |
# Renaming this file to "Makefile" and running "make" should just work. | |
# But you can also override one or more recipes: | |
# | |
# - Include this file with "include go.mk" as the first line of your custom Makefile | |
# - Define recipes using SRCDIR, GOROOT, GCFLAGS, LDFLAGS |
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
package main | |
import ( | |
"fmt" | |
"database/sql" | |
"time" | |
_ "github.com/VoltDB/voltdb-client-go/voltdbclient" | |
) |
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
// http://www.trtspor.com.tr/canli-yayin-izle/trt-spor-159/ | |
$(".video-single .video-source").css("width", "1280px");$("#wrapper .top-navigation,.all_wrapper .header, .bar, .content, .footer").add($(".video-source > div")[1]).remove();$("body,.all_wrapper,.video-detail").css("background","#000000"); |
OlderNewer