Skip to content

Instantly share code, notes, and snippets.

View GitHub30's full-sized avatar
🌴
On vacation

GitHub30

🌴
On vacation
  • Osaka, Japan
View GitHub Profile
var code = `mbstring.language = Japanese
mbstring.encoding_translation = Off
[mbstring]
mbstring.language = Japanese
mbstring.encoding_translation = Off
mbstring.detect_order = UTF-8,SJIS,EUC-JP,JIS,ASCII
mbstring.substitute_character = none
mbstring.strict_detection = Off
zend_extension = xdebug`
var langs = ["c","cpp","csharp","css","diff","go","groovy","html","java","javascript","objc","perl","php","python","r","ruby","sass","scala","shell","sql","swift","xml","yaml"]
<?php
var_dump(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE);
set -xe \
&& sudo dnf install -y libnsl \
&& curl -LO https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/7.1.33/xampp-linux-x64-7.1.33-1-installer.run \
&& chmod +x xampp-linux-x64-7.1.33-1-installer.run \
&& sudo ./xampp-linux-x64-7.1.33-1-installer.run --mode unattended \
&& echo 'PATH="/opt/lampp/bin:$PATH"' >> ~/.bashrc \
&& source ~/.bashrc \
&& sudo /opt/lampp/lampp start \
&& sudo systemctl stop firewalld \
&& sudo systemctl disable firewalld
$client = New-Object System.Net.Sockets.UdpClient
$client.Send([System.Text.Encoding]::UTF8.GetBytes("M-SEARCH*HTTP/1.1`r`nST:upnp:rootdevice"), 37, "192.168.10.1", 1900)
[System.Text.Encoding]::UTF8.GetString($client.Receive([ref][System.Net.IPEndPoint]::New([IPAddress]::Any, 0)))
echo -e 'M-SEARCH*HTTP/1.1\r\nST:upnp:rootdevice' | nc -u 192.168.10.1 1900
__import__("google.cloud.logging").cloud.logging.Client().setup_logging()
@GitHub30
GitHub30 / ip check.sh
Last active October 30, 2022 10:29
curl -s httpbin.org/ip | jq -r .origin
curl -O https://gist.githubusercontent.com/GitHub30/b8758a658a9b98bfa5a6efa17ee07e63/raw/urls.txt
for url in $(cat urls.txt); do curl -w '%{http_code},%{time_namelookup},%{time_connect},%{time_appconnect},%{time_pretransfer},%{time_starttransfer},%{time_total},%{url_effective}\n' -so /dev/null "$url"; done
curl -O https://gist.githubusercontent.com/GitHub30/b8758a658a9b98bfa5a6efa17ee07e63/raw/031c2e73dd4179156cb9303fea9464d2f242bd08/urls2.txt
for url in $(cat urls2.txt); do curl -w '%{http_code},%{time_namelookup},%{time_connect},%{time_appconnect},%{time_pretransfer},%{time_starttransfer},%{time_total},%{url_effective}\n' -so /dev/null "$url"; done
sudo apt install -y tmux
# new session
tmux
# attach session
tmux a
# detach
Ctrl+b d
/**
* This is the main Node.js server script for your project
* Check out the two endpoints this back-end API provides in fastify.get and fastify.post below
*/
const path = require("path");
const fetch = require('node-fetch');
// Require the fastify framework and instantiate it
const fastify = require("fastify")({