Skip to content

Instantly share code, notes, and snippets.

@kangtastic
kangtastic / md4.py
Last active March 28, 2024 09:48
An implementation of the MD4 hash algorithm in pure Python 3.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright © 2019 James Seo <james@equiv.tech> (github.com/kangtastic).
#
# This file is released under the WTFPL, version 2 (wtfpl.net).
#
# md4.py: An implementation of the MD4 hash algorithm in pure Python 3.
#
# Description: Zounds! Yet another rendition of pseudocode from RFC1320!
@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 09:47
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@lewangdev
lewangdev / default.custom.yaml
Last active March 28, 2024 09:46
雾凇拼音自定义配置,MacOS-like & Wechat-like Dark/Light Color Scheme For Rime
patch:
# 菜单
menu:
page_size: 8 # 候选词个数
# alternative_select_labels: [ ①, ②, ③, ④, ⑤, ⑥, ⑦, ⑧, ⑨, ⑩ ] # 修改候选项标签
# alternative_select_keys: ASDFGHJKL # 如编码字符占用数字键,则需另设选字键
# ascii_mode、inline、no_inline、vim_mode 等等设定,可参考 /Library/Input Methods/Squirrel.app/Contents/SharedSupport/squirrel.yaml
# 中西文切换
#
# 【good_old_caps_lock】 CapsLock 切换到大写或切换中英。
### Flatpak Repos
List packages on a repo :
flatpak remote-ls repon-name --user
flatpak remote-ls
Install packages :
flatpak --user install repo-name package-name io.liri.Platform
Flathub:
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active March 28, 2024 09:46
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@denji
denji / nginx-tuning.md
Last active March 28, 2024 09:45
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@myyc
myyc / how_to_crack_ebooks.md
Last active March 28, 2024 09:44
How to crack ebooks

How to crack ebooks on Linux

If you made the mistake of buying Kindle ebooks and you don't have an iPad or a Kindle to read them on, or if you decided to buy ebooks off a third party reseller and realised they aren't epubs but some bullshit "Adobe DRM" file, this guide is for you.

Adobe DRM

If you have an (unopened) Adobe DRM ebook, forget DeDRM and similar tools,