Skip to content

Instantly share code, notes, and snippets.

View bluet's full-sized avatar
🏠
Working from home

BlueT - Matthew Lien - 練喆明 bluet

🏠
Working from home
View GitHub Profile
@rmcintosh
rmcintosh / Most Common Download Hashes
Last active July 22, 2020 19:54
SSH Honeypot Stats
1,2d68e605d5c23507a502f69a93d7c352cbe40ebee54a1b54944ef535add0a02b
2,2409fb21fe377f7e12dda392f26d7c93b7715239169d362dd907fe499ab38ee9
3,0636d8749ecb285c293dc533c9b7690ba17ac7902488bf39164129a12d54c1c3
4,32db4c85faf0d58065912af97522befafcfdf73e92a3d549ea11921d25cc6547
4,94b59b4761147519fecf662cecba7219ac2f70682ae02685081a181758cb705f
7,dd58910a2ea62dd1a48b297f589e7df315c9618d87624122bbe2a7eb94d33d99
8,16e4ea7fb26ca210415224006bc417db3524f0332d48ff9deaeee979f2f93add
8,c15f59b58e9d9f3b992287037c8e7d3dd42f22979cb41de4389c25efcab6509b
26,3e05c20fbc42b6d8930f03d7bc4c12d1f498147962e7c500c3545bfdaa5bfa42
6e136e9da8372bc94899ecef857c540567
$1$4UzUg9Tg$yg8DPUJhAhMRxaE6SM6Yl.
!@#$%^&*()1234457890!@#$%^&*()7890
dragos3443gff@665$G455454dragos2sd
$1$rGEspa1r$4XhhKTz4LC7UBgKgp3WWw
rooooooooooooooooooooooooooooooot
%!SOJIE>COMFW%$#@!QWERTGFDSAZXCVB
UIYORYIPRTEWFDJDHGKJRRTEWEGSDFHFS
$1$EdkQIoSn$T3gzKLxlcxF7tsTCFqC8M
cappothebossradiopasiuniisthebest
@Ovid
Ovid / exception.md
Last active March 21, 2022 06:51
Exceptions in Perl?

Preface

This is something that likely cannot be made into an RFC for the Perl language at this time because implementation would be greatly simplified when the Corinna object model is in core. For example, a base class for what is discussed might look like the following:

# Exception is a poor name for warnings, so a better name is warranted
class Exception :version(v0.1.0) {
    # $message and $description might be from a messaging role
    field $message     :reader :param;
    field $description :reader :param { "" };
@offirgolan
offirgolan / unwatch-gh-org.js
Created August 2, 2017 05:57
Unwatch All Org Repos
// Navigate to https://github.com/watching and then run:
// Taken from: https://stackoverflow.com/questions/11043374/how-to-unwatch-multiple-repos-easily-on-github
Array.prototype
.slice.apply(document.querySelectorAll('.js-subscription-row'))
.forEach(el => { const org = el.querySelector('a[href^="/YOUR_ORG"]'); if (org) el.querySelector('button').click()});
@spbriggs
spbriggs / aws-cheapest.php
Created August 31, 2016 07:38
PHP script to scrape spot instance pricing data from Amazon AWS and display cheapest region for each instance tyoe
<?php
// Copyright Simon Briggs 2016
// Licensed under the Gnu Lesser General Public License
// https://www.gnu.org/licenses/lgpl.txt
// Get pricing data from Amazon
// (For better performance get the data and cache it with a cron job)
$data = file_get_contents("https://spot-price.s3.amazonaws.com/spot.js");
// Trim off the JSONP function to give us propert JSON
$data = substr($data, 9, strlen($data)-10);
@louisaslett
louisaslett / ec2-spot-price.sh
Last active April 17, 2022 17:41
Check Amazon EC2 spot prices for an instance type across all regions
#!/bin/bash
# 0. Ensure AWS CLI tool installed: pip install awscli
# 1. Make shell script executable: chmod u+x ec2-spot-prices.sh
# 2. Run script and provide instance type to check: ./ec2-spot-prices.sh c4.8xlarge
# 3. Script runs and outputs full stops while querying the Amazon API,
# returning three columns: Region+AZ, Instance Type, Current Spot Price in $
allSpot=""
for Reg in eu-west-1 eu-west-2 eu-west-3 eu-central-1 eu-north-1 ca-central-1 us-east-1 us-east-2 us-west-1 us-west-2 sa-east-1 ap-southeast-1 ap-northeast-1 ap-east-1 ap-northeast-2 ap-southeast-2 ap-south-1

Running Minikube via LXD

I make some assumptions, and make no claims in how well supported this is or ever will be. I wanted to avoid using VMs because i've been working in containers for the last half decade. It made sense to just skip the middle man and use a machine type container system to run my minikube workloads.

Why not juju?

Simply put, Juju does a fantastic job; but to stay objective I wanted to achieve minikube in LXD as a functional alternative to juju deploy kubernetes-core, or using KVM/VirtualBox in this solution.

@audreyt
audreyt / posa.mkdn
Last active November 28, 2022 21:24
EtherCalc.tw

從 SocialCalc 到 EtherCalc

先前在《開源應用程式架構》 一書中,我介紹了 SocialCalc 這個在瀏覽器中運行的試算表編輯器,以取代伺服器為中心的 WikiCalc 架構。SocialCalc 在瀏覽器中執行所有的運算,只有在載入和儲存試算表時才會使用伺服器。

追求效能是 Socialtext 團隊在 2006 年時設計 SocialCalc 的主要目的。重點在於:在 JavaScript 環境下執行客戶端運算,儘管在當年的速度僅有伺服器端 Perl 運算的十分之一,但仍然勝過 AJAX 來回傳輸資料造成的網路延遲:


WikiCalc 與 SocialCalc 架構比較

******
@mtigas
mtigas / 0-hidden-service-subdomains.md
Last active April 14, 2023 02:06
Example code for running a (HTTP/HTTPS) Tor hidden service supporting subdomains.

The following files show an example of how to create subdomains for onion site hidden services. (This hasn't been tested for hidden services for anything other than HTTP/HTTPS.)

(You might also want to read our blog post about ProPublica’s Tor hidden service, including a tutorial and notes on running a hidden service: https://www.propublica.org/nerds/item/a-more-secure-and-anonymous-propublica-using-tor-hidden-services )

In general, this works (maybe just in recent Tor clients) because Tor will handle the connection to www.xxxxxxxxxxxxxxxx.onion as a connection to xxxxxxxxxxxxxxxx.onion. The encapsulated HTTP/HTTPS connection contains the subdomain in the Host: header (and in the case of HTTPS, the SNI

@diegoparrilla
diegoparrilla / cloudflare-workers-apilityio.js
Last active April 19, 2023 12:20
Using Cloudflare Workers and https://Apility.io API add to the request headers information of the blacklists of abusers that contains the IP address of the client.
addEventListener('fetch', event => {
event.respondWith(fetchAndCheckOrigin(event.request))
})
async function fetchAndCheckOrigin(req) {
try {
startTime = new Date();
const body = await req.body;
const ip = req.headers.get('cf-connecting-ip');
const es = req.headers.get('cf-ipcountry');