Skip to content

Instantly share code, notes, and snippets.

View vangie's full-sized avatar

Vangie Du vangie

View GitHub Profile
@vangie
vangie / gru-avatar.user.js
Last active April 28, 2024 06:22
Gru Avatar
// ==UserScript==
// @name Gru Avatar
// @namespace http://tampermonkey.net/
// @version 2024-04-28.02
// @description Random Avatar for Gru
// @author You
// @match https://*.babeltech.net/gru
// @match https://*.babeltech.net/gru/*
// @icon https://staging.babeltech.net/images/favicon.png
// @grant none
@vangie
vangie / stat.sh
Created March 2, 2020 02:31
github issue ็ปŸ่ฎก
#!/bin/bash
REPO=alibaba/serverless-vscode
URL=https://api.github.com/search/issues
DATE=2019-10-07
count_issue(){
n=0
until [ $n -ge 5 ]
@vangie
vangie / china.geojson
Created July 10, 2017 08:38
ไธญๅ›ฝๅœฐๅ›พ
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vangie
vangie / docker-logs-clean.sh
Created October 14, 2016 14:54
clean docker container logs
#!/bin/bash
# sudo ./docker-logs-clean.sh container_name
logfile=$(docker inspect $1 | grep -G '"LogPath": "*"' | sed -e 's/.*"LogPath": "//g' | sed -e 's/",//g');
echo "clean log file of container $1: $logfile"
truncate -s 0 $logfile
echo "done."
๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ”
๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ”
๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ”
๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ”
๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ”
๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ”
๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ”
๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ”
๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ”
๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ”
@vangie
vangie / git_init.sh
Created February 24, 2015 13:29
initial git repo of hongbao
#!/bin/bash
[ -d hongbao ] && rm -rf hongbao
mkdir hongbao
cd hongbao
git init
git config user.name "duwan"
git config user.email "[email protected]"
@vangie
vangie / drop_tabels.sql
Last active August 29, 2015 14:12
Drop all tables of current database in MySQL
SET FOREIGN_KEY_CHECKS = 0;
SET GROUP_CONCAT_MAX_LEN=32768;
SET @tables = NULL;
SELECT GROUP_CONCAT('`', table_name, '`') INTO @tables
FROM information_schema.tables
WHERE table_schema = (SELECT DATABASE());
SELECT IFNULL(@tables,'dummy') INTO @tables;
SET @tables = CONCAT('DROP TABLE IF EXISTS ', @tables);
PREPARE stmt FROM @tables;
#!/bin/bash
#Auto-reconnecting wget downloads upon disconnection.
WGET="wget -c -t 0 --timeout=3 --waitretry=3"
mkdir -p "ๅœฐ็ƒๅพ€ไบ‹" && cd $_
for i in {1..49}
do
$WGET "http://jwplay.iusheng.com/AS03/audio1206/15548/$(printf "%03d" $i).mp3"
done
@vangie
vangie / 01_kivivm.js
Last active August 29, 2015 14:01
kivivm่ฎพ็ฝฎ่„šๆœฌ
/**
* kivivm่ฎพ็ฝฎ่„šๆœฌ
*
* ๅœจๆต่งˆๅ™จๆŽงๅˆถๅฐๆ‰ง่กŒ๏ผŒๅฏไปฅ่ฎพๅฎšๅŸŸๅ่งฃๆž๏ผŒๅๅ‘ๅŸŸๅ่งฃๆž
* ๆŽงๅˆถๅฐ่พ“ๅ‡บๅฆ‚ไธ‹็ป“ๆž„,ๅŒ…ๆ‹ฌrootๅฏ†็ ๏ผŒssh็ซฏๅฃๅท๏ผŒIPๅœฐๅ€๏ผŒ
*
* "www" => { "passwd" => "vd7sdfMfwdz", "port" => "26212", "ips" => %w(101.182.180.163 137.182.180.204 107.184.180.214 107.122.181.209)}
*
* ๅฏ็”จไบŽkivivm.rb่„šๆœฌ่ฎพๅฎš
* DNSPod็š„ๅŸŸๅ่งฃๆž
@vangie
vangie / header_encoded
Created April 4, 2014 14:41 — forked from jpadilla/header_encoded
JSON Web Token
eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9