Skip to content

Instantly share code, notes, and snippets.

View enkr1's full-sized avatar
🎯
If you actually try your best, you can't lose.

ENKR | Jing Hui PANG | 彭竞辉 enkr1

🎯
If you actually try your best, you can't lose.
View GitHub Profile
@enkr1
enkr1 / rotate.js
Created April 29, 2024 11:41 — forked from Zyndoras/rotate.js
Rotate base64 image (Javascript)
function rotate(srcBase64, degrees, callback) {
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
const image = new Image();
image.onload = function () {
canvas.width = degrees % 180 === 0 ? image.width : image.height;
canvas.height = degrees % 180 === 0 ? image.height : image.width;
ctx.translate(canvas.width / 2, canvas.height / 2);
@enkr1
enkr1 / useHexo.md
Created November 24, 2023 04:00 — forked from btfak/useHexo.md
How to use Hexo and deploy to GitHub Pages
@enkr1
enkr1 / top-brew-packages.txt
Created November 14, 2023 03:04 — forked from pmkay/top-brew-packages.txt
Top homebrew packages
node: Platform built on V8 to build network applications
git: Distributed revision control system
wget: Internet file retriever
yarn: JavaScript package manager
python3: Interpreted, interactive, object-oriented programming language
coreutils: GNU File, Shell, and Text utilities
pkg-config: Manage compile and link flags for libraries
chromedriver: Tool for automated testing of webapps across many browsers
awscli: Official Amazon AWS command-line interface
automake: Tool for generating GNU Standards-compliant Makefiles
Encoded Traversal Strings:
../
..\
..\/
%2e%2e%2f
%252e%252e%252f
%c0%ae%c0%ae%c0%af
%uff0e%uff0e%u2215
@enkr1
enkr1 / settings.json
Last active June 8, 2023 04:02
~/Library/Application Support/Code/User/settings.json
{
"files.autoSave": "afterDelay",
"[php]": {
"editor.defaultFormatter": "bmewburn.vscode-intelephense-client",
"editor.tabSize": 4,
},
"git.autofetch": true,
"workbench.colorTheme": "Material Theme Palenight High Contrast",
"[css]": {
"editor.defaultFormatter": "vscode.css-language-features"
@enkr1
enkr1 / me.ex
Last active February 18, 2023 22:28
About Me (Elixir)
defmodule User do
use MapSet
defstruct [
:first_name,
:last_name,
:bio,
:email,
:roles,
:interests,
@enkr1
enkr1 / list-of-curl-options.txt
Created December 13, 2022 08:54 — forked from eneko/list-of-curl-options.txt
List of `curl` options
$ curl --help
Usage: curl [options...] <url>
--abstract-unix-socket <path> Connect via abstract Unix domain socket
--alt-svc <file name> Enable alt-svc with this cache file
--anyauth Pick any authentication method
-a, --append Append to target file when uploading
--basic Use HTTP Basic Authentication
--cacert <file> CA certificate to verify peer against
--capath <dir> CA directory to verify peer against
-E, --cert <certificate[:password]> Client certificate file and password
@enkr1
enkr1 / me.php
Last active February 18, 2023 22:27
About Me (PHP)
<?php
$me = new User([
"first_name" => "Jing Hui",
"last_name" => "Pang",
"email" => "[email protected]",
"pronoun" => "he/him",
"status" => "Hired",
"company" => "Pixium Digital",
"roles" => [
@enkr1
enkr1 / .bash_aliases
Created July 14, 2021 09:47 — forked from vratiu/.bash_aliases
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset