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
<?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']); |
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
<?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]); |
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
for i in *.wav; do test -f "${i%.wav}.mp3" || lame -b 320 -h "${i}" "${i%.wav}.mp3"; done |
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 | |
declare $(xinput | grep -i touchscreen | awk {'print$5'}) | |
monitor=$(xrandr | grep primary | awk {'print$1'}) | |
xinput map-to-output ${id} ${monitor} |
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 | |
# 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 |
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 | |
readonly LOG_FILE=/var/log/droidcam.log | |
exec 1>$LOG_FILE | |
exec 2>&1 | |
port=4747 | |
date | |
env | |
/usr/bin/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
#!/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) |
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
date -us "$(curl -Is google.com | grep '^Date:' | cut -d' ' -f3-)" |
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 post(url, data) { | |
var form = $(document.createElement('form')); | |
$(form).attr("action", url); | |
$(form).attr("method", "POST"); | |
$(form).prop("hidden", true); | |
for (const key in data) { | |
var input = $("<input>") | |
.attr("type", "text") | |
.attr("name", key) |
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
create or replace function bytes2human(val in varchar2) return varchar2 is | |
res varchar2(50); | |
num number; | |
unit varchar2(1); | |
pow integer; | |
type array_t is varray(6) of varchar2(1); | |
pow2unit array_t := array_t('', 'K', 'M', 'G', 'T', 'P'); | |
begin | |
num := regexp_replace(val, '[^0-9,.]', ''); |
OlderNewer