Skip to content

Instantly share code, notes, and snippets.

View skyleaworlder's full-sized avatar
🤔
Confused by my life

Jiageng skyleaworlder

🤔
Confused by my life
View GitHub Profile
@skyleaworlder
skyleaworlder / config.sh
Created September 26, 2023 13:32
git config
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
git config --global alias.cm commit
git config --global alias.ck checkout
git config --global alias.st status
git config --global alias.sw switch
git config --global alias.re restore
@skyleaworlder
skyleaworlder / hook.jl
Last active February 13, 2023 09:17
One way to hook function elegantly using IRTools.
using IRTools
macro hook(method_call_ex, f_name, args...)
ir = gensym()
f = gensym()
return esc(quote
local $ir = IRTools.@code_ir($method_call_ex)
# first: the original function body
IRTools.pushfirst!($ir, :(println("Hello World!")))
local $f = IRTools.func($ir)
@skyleaworlder
skyleaworlder / git-config.sh
Created October 21, 2022 12:56
Git Config
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
git config --global alias.cm commit
git config --global alias.st status
git config --global alias.ck checkout
git config --global alias.re restore
git config --global alias.sw switch
@skyleaworlder
skyleaworlder / solving_spark_signature_error.md
Created March 16, 2022 06:46 — forked from hkhamm/solving_spark_signature_error.md
Solving a Spark Invalid signature file digest for Manifest main attributes error

##Solving a Spark error: Invalid signature file digest for Manifest main attributes

When using spark-submit to run a jar, you may encounter this error:

Invalid signature file digest for Manifest main attributes

The error occurs when one of the included libraries in the jar's META-INF directory has a bad signature.

@skyleaworlder
skyleaworlder / gist:70eed7164d13969eee2b77aaf8c98cda
Created April 9, 2021 07:02 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@skyleaworlder
skyleaworlder / jb51_books_check.py
Created February 21, 2021 15:59
jb51(脚本之家) pdf 网页存活情况检查 (非百度云链接检查)
import requests
import urllib
import re
import sys
def getInfo(book_id):
url = "https://www.jb51.net/books/"+str(book_id)+".html"
res = requests.get(url)
res.encoding = "GBK"
@skyleaworlder
skyleaworlder / DCT_QMG.cpp
Created December 10, 2020 16:24
DCT-Quantum-Matrix-Generator-C++
#include "DCT_QMG.hpp"
// Quantitum Matrix: Q_{50}
// using Q_{50} as a standard to generate other Matrix
std::vector<double> DCT::Quant_matrix_50 = std::vector<double> {
16, 11, 10, 16, 24, 40, 51, 61,
12, 12, 14, 19, 26, 58, 60, 55,
14, 13, 16, 24, 40, 57, 69, 56,
14, 17, 22, 29, 51, 87, 80, 62,
18, 22, 37, 56, 68, 109,103,77,
@skyleaworlder
skyleaworlder / zig_zag.hpp
Last active December 10, 2020 12:57
Zig-zag Algothrim using C++ FA
#include <vector>
/**
* @brief Zig-zag Algothrim
* @param input: vector<T>
* @return vector<T> (zig-zag vector)
*/
template<class T>
std::vector<T> zig_zag(std::vector<T> input) {