Skip to content

Instantly share code, notes, and snippets.

View Pagliacii's full-sized avatar
🎯
Focusing

Jason Huang Pagliacii

🎯
Focusing
View GitHub Profile
@Pagliacii
Pagliacii / main.go
Last active October 22, 2019 19:37
Golang version of the base62 algorithm. Details: https://gist.github.com/bhelx/778542
package main
import (
"fmt"
"log"
"math"
"os"
"regexp"
"strconv"
@Pagliacii
Pagliacii / stickers-downloader.js
Created April 27, 2018 03:14 — forked from lubien/stickers-downloader.js
Download all visible telegram stickers images
// How to download telegram sticker images
/*
1. Go to Telegram Web;
2. Open console (F12);
3. Paste the code below in the console and press Enter;
4. Open your stickers menu and make sure you see the sticker pack you want to download (so Telegram will load it).
5. At the console paste and run "downloadStickers()" any time you want to download a pack.
6. [Convert .webm to another format](http://www.freewaregenius.com/convert-webp-image-format-jpg-png-format/);
7. Happy hacking.
@Pagliacii
Pagliacii / win_api_test.py
Last active February 25, 2024 20:40
Use ctypes to call WIndows API
#!/usr/bin/env python3
# _*_ coding:utf-8 _*_
import ctypes
import os
from ctypes import windll, wintypes
from typing import Optional
NULL: int = 0
@Pagliacii
Pagliacii / cipher.go
Last active December 8, 2018 17:48
Caesor Cipher by Golang
package main
import (
"flag"
"fmt"
"os"
"strings"
"unicode"
)
@Pagliacii
Pagliacii / README-Template.md
Created December 7, 2018 03:45 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@Pagliacii
Pagliacii / iterm2-solarized.md
Created December 7, 2018 09:26 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

(function (history, trackingId, options) {
const generateId = () => {
return '_' + Math.random().toString(36).substr(2, 9);
};
const getId = () => {
if (!localStorage.cid) {
localStorage.cid = generateId()
}
return localStorage.cid;
};
@Pagliacii
Pagliacii / install-ext.sh
Last active April 26, 2019 03:38
This script is used to install the vscode extension manually. Or to install an extension to the code-server.
#!/usr/bin/env bash
#===============================================================================
# This script is used to install the vscode extension manually.
# Or to install an extension to the code-server.
# Inspire by https://github.com/codercom/code-server/issues/171#issuecomment-473690326
#
# It has two way to install the extension:
# 1. by the extension ID
# 2. by the local vsix file
@Pagliacii
Pagliacii / main.py
Last active July 30, 2019 03:00
Find the default open command by file extension on Windows
# _*_ coding:utf-8 _*_
from subprocess import Popen, PIPE
class AssociationNotFound(Exception):
# means: File association not found for extension .ext
pass
@Pagliacii
Pagliacii / rust.json
Last active June 26, 2021 09:24
Useful snippets for Rust in VSCode.
{
// Place your snippets for rust here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",