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
set term svg enhanced size 1280,960 background rgb "white" | |
set datafile separator "|" | |
set xdata time | |
set timefmt "%s" | |
set output "/dev/null" | |
plot "< sqlite3 /srv/nfs4/iperf3.sqlite3 'select * from IPERF where TIMESTAMP between strftime(\"%s\",datetime(\"now\",\"-3 days\")) and strftime(\"%s\",datetime(\"now\",\"-2 days\"));'" u ($1+9*60*60):3 | |
x3_min = GPVAL_DATA_X_MIN | |
x3_max = GPVAL_DATA_X_MAX | |
plot "< sqlite3 /srv/nfs4/iperf3.sqlite3 'select * from IPERF where TIMESTAMP between strftime(\"%s\",datetime(\"now\",\"-2 days\")) and strftime(\"%s\",datetime(\"now\",\"-1 days\"));'" u ($1+9*60*60):3 |
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 | |
set -e | |
set -x | |
trap_exit(){ | |
sudo lxc-stop -n mastodon_x || : | |
sudo lxc-destroy -n mastodon_x | |
} | |
trap trap_exit EXIT |
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
db_prefix = "/srv/nfs4/" | |
db(f) = db_prefix . f . ".sqlite3" | |
hexcolor(r, g, b) = sprintf("#%02x%02x%02x", r, g, b) | |
set term svg enhanced size 1024,480 background rgb "white" | |
set output "/opt/local/nginx/html/sensors/g2_brightness.svg" | |
set datafile separator "," | |
set xdata time | |
set timefmt "%Y-%m-%d %H:%M:%S" |
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 python2 | |
# -*- coding: utf-8 -*- | |
import Adafruit_DHT as DHT | |
import sqlite3 | |
import sys | |
import time | |
from datetime import datetime | |
DB_FILE = "/nfs/DHT11.sqlite3" |
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
/* SQLite 3.16.2 */ | |
select | |
* | |
from | |
DHT11 | |
where | |
ROWID > (select max(ROWID) from DHT11) - 10 | |
union all select 'Max within 24 hours', max(TEMP) , max(HUMIDITY) from DHT11 where DATE >= datetime('now','-24 hours','localtime') | |
union all select 'Avg within 24 hours',printf('%2d',avg(TEMP)),printf('%2d',avg(HUMIDITY)) from DHT11 where DATE >= datetime('now','-24 hours','localtime') |
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 | |
set -e | |
set -x | |
qaac64(){ | |
QAAC64=~/Applications/qaac_2.59/x64/qaac64.exe | |
export WINEDEBUG=fixme-all | |
wine "${QAAC64}" "${@}" | |
} |
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/sh | |
set -e | |
set -u | |
set -x | |
# Environment variables | |
export PATH=/usr/bin:/bin:/usr/sbin:/bin | |
export LANG=en_US.UTF-8 | |
# External commands |
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/sh | |
set -e | |
set -x | |
case ${VLC} in | |
"") | |
VLC=`which vlc` | |
;; | |
esac | |
test -x "${VLC}" |
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/sh | |
set -e | |
# watermark font | |
font="Noto-Sans-CJK-JP-Bold" | |
# watermark color | |
color="#0004" | |
# arguments process |
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
public class cbccee4e { | |
public static void main(String[] args) { | |
int[] c1; | |
c1 = new int[3]; | |
c1[0] = 1; | |
c1[1] = 2; | |
c1[2] = 3; | |
for (int i = 0; i < 3; i++) { | |
System.out.println(c1[i]); | |
} |