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
Options +FollowSymLinks | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} .*\.dev$ [NC] | |
RewriteCond %{ENV:REDIRECT_STATUS} !200 | |
RewriteRule ^.*$ %{HTTP_HOST}%{REQUEST_URI} [L] |
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
<VirtualHost *:80> | |
ServerName a.dev | |
ServerAlias *.dev | |
VirtualDocumentRoot "/var/www/%1" | |
UseCanonicalName Off | |
php_admin_flag safe_mode Off | |
</VirtualHost> | |
<Directory /var/www/> | |
Options Indexes FollowSymLinks MultiViews |
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 | |
# ============== | |
# git autodeploy | |
# ============== | |
# | |
# makes a bare git repo deploying a specific branch on every commit. | |
# creates repo if cwd is not the root of a bare repo. Requirements: | |
# - `git` | |
# - `ssh-copy-id` |
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
// init | |
#include <elapsedMillis.h> | |
#include <ESP8266WiFi.h> | |
#include <DNSServer.h> | |
#include <ESP8266WebServer.h> | |
#include <WiFiManager.h> | |
#include <ESP8266HTTPClient.h> | |
#include <elapsedMillis.h> | |
#define WATTS_PER_SIGNAL 0.5 | |
#define RESETBUTTON_DELAY 1500 |
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
return do shell script "nettop -cdm route -L 1 -k time,bytes_out,rx_dupe,rx_ooo,re-tx,conn_att,conn_est,rtt_avg | head -2 | tail -1 | cut -d, -f2- | cut -f1 -d\",\"" |
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://unix.derkeiler.com/Mailing-Lists/FreeBSD/stable/2012-02/msg00157.html | |
http://docs.oracle.com/cd/E19253-01/819-5461/6n7ht6r2s/index.html#gcfgr | |
get stats: cat /proc/spl/kstat/zfs/arcstats | |
@ruegand | |
zpool create \ | |
-o compression=on \ | |
-o primarycache=metadat \ # (only metadata in L1ARC) | |
-o secondarycache=all \ | |
-o compression=on \ |
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
apt install libapache2-mod-php7.0 php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring \ | |
php7.0-intl php7.0-mcrypt php-imagick php7.0-xml php7.0-zip php7.0-apcu php7.0-redis | |
phpenmod apcu redis |
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 | |
# author: louwrentius | |
# source: http://louwrentius.com/zfs-on-linux-monitor-cache-hit-ratio.html | |
INTERVAL="$1" | |
if [ -z $INTERVAL ] | |
then | |
INTERVAL=5 |
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
return do shell script "echo cpu $(ps axo %cpu | awk '{s+=$1}END{print s}' | cut -f 1 -d '.')%" |
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
return do shell script "echo cpu $(ps axo %cpu | awk '{s+=$1}END{print s}' | cut -f 1 -d '.')%" |
OlderNewer