View date_sync.sh
date -us "$(curl -Is google.com | grep '^Date:' | cut -d' ' -f3-)" |
View namecheap.sh
#!/bin/bash | |
### CONFIG INI | |
HOST='subdom' | |
DOMAIN='example.com' | |
PASSWD='<SECRET>' | |
URL='https://dynamicdns.park-your-domain.com/update' | |
### CONFIG END | |
IP=$(curl -s ifconfig.me) |
View droidcam.sh
#!/bin/bash | |
readonly LOG_FILE=/var/log/droidcam.log | |
exec 1>$LOG_FILE | |
exec 2>&1 | |
port=4747 | |
date | |
env | |
/usr/bin/id |
View vt8.sh
#!/bin/bash | |
# To get the vmid, use: | |
# VBoxManage list vms | |
VM="{3b019d6d-16d1-4a8b-909d-8c79e53abd2d}"; | |
XN=4; | |
XS=/tmp/.X11-unix; | |
# Create a new X server on vt8 |
View touch-monitor.sh
#!/bin/bash | |
declare $(xinput | grep -i touchscreen | awk {'print$5'}) | |
monitor=$(xrandr | grep primary | awk {'print$1'}) | |
xinput map-to-output ${id} ${monitor} |
View wav-mp3
for i in *.wav; do test -f "${i%.wav}.mp3" || lame -b 320 -h "${i}" "${i%.wav}.mp3"; done |
View get_free_fa_icons.php
<?php | |
function proc_fa($page) { | |
$curl = curl_init($page); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); | |
$tmp = curl_exec($curl); | |
curl_close($curl); | |
preg_match('/window.__inline_data__ =(.*?)<\/script>/s', $tmp, $match); | |
$res = json_decode($match[1]); |
View check_cert.php
<?php | |
$urls = json_decode(file_get_contents('sites.json'),true); | |
function certdata($url) { | |
$parseurl = parse_url($url, PHP_URL_HOST); | |
$get = stream_context_create(array("ssl" => array("capture_peer_cert" => TRUE))); | |
$read = stream_socket_client("ssl://".$parseurl.":443", $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $get); | |
$cert = stream_context_get_params($read); | |
return openssl_x509_parse($cert['options']['ssl']['peer_certificate']); |