Skip to content

Instantly share code, notes, and snippets.

@OrionReed
OrionReed / DOM3D.js
Last active March 29, 2024 09:25
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; // ¯\\_(ツ)_/¯
@jaflo
jaflo / description.md
Created May 6, 2020 03:51
Export Instapaper to HTML & PDF

Use this to automatically scrape all of your saved Instapaper articles locally as HTML and PDF files. I originally wrote this to read my saved documents on my reMarkable tablet. Instapaper does not have an option to export all my stuff as PDF as far as I could tell (the built-in options only export a subset).

You will need to have the following packages installed:

Configure your username and password, then run the script. It will go through all articles shown on your home page and download the copy Instapaper has stored into a folder called output as HTML file and convert it into a PDF. You can customize the look by updating the included styles.css file. Any errors will be reported and logged to failed.txt. Errors might be due to parsing errors on Instapaper's side or due to PDF conversion issues.

@c3rb3ru5d3d53c
c3rb3ru5d3d53c / mitmhttp
Last active March 29, 2024 09:20
mitmhttp - a simple mitmproxy http redirector tool
#!/usr/bin/env bash
DARKGREEN=$'\e[00;32m'
GREEN=$'\e[01;32m'
TEAL=$'\e[00;36m'
DARKGREY=$'\e[01;30m'
CYAN=$'\e[01;36m'
LIGHTGREY=$'\e[00;37m'
RED=$'\e[00;31m'
PINK=$'\e[01;31m'
@intrntbrn
intrntbrn / fancy_taglist.lua
Last active March 29, 2024 09:20
awesomewm fancy_taglist: a taglist that contains a tasklist for each tag
-- awesomewm fancy_taglist: a taglist that contains a tasklist for each tag.
-- Usage:
-- 1. Save as "fancy_taglist.lua" in ~/.config/awesome
-- 2. Add a fancy_taglist for every screen:
-- awful.screen.connect_for_each_screen(function(s)
-- ...
-- local fancy_taglist = require("fancy_taglist")
-- s.mytaglist = fancy_taglist.new({
-- screen = s,
@ebta
ebta / dat2mp4.bat
Created April 24, 2016 14:58
Fast convert VCD (*.dat) to MP4 with ffmpeg
"C:\Dir\ffmpeg\bin\ffmpeg" -i %1 -vcodec copy -acodec copy "F:\TargetDir\%~n1.mp4"
#!/usr/bin/env bash
# --slave /usr/bin/$1 $1 /usr/bin/$1-\${version} \\
function register_clang_version {
local version=$1
local priority=$2
update-alternatives \
--install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${version} ${priority} \
@baymaxium
baymaxium / content.md
Created October 18, 2017 09:00
基于Kubernetes的私有容器云建设实践

原文:Docker

本次分享为大家介绍易宝支付私有容器云从0到1的建设之路。包括技术选型、理论基础、基于Kubernetes的容器云和CI/CD落地过程中的挑战和踩过的坑。

建设背景及目标

在Docker技术流行开来之前,保证软件交付的质量和速度对于大多数企业来说都是困难的。业务的复杂性带来了应用的复杂性,面对成千上万的不同应用,运维部门需要时刻应对来自不同应用、不同环境的挑战。特别是在自动化运维程度不高的企业,“人肉运维”成了解决问题的常用手段,人肉运维使软件交付的周期变得漫长、人为事故风险升高。 2013年,Docker横空出世,它的"Build once, Run anywhere"的特性让软件交付焕然一新。我们在认真调研了Docker技术后,决定构建自己的私有容器云,背景和目标如下:

@adrianhajdin
adrianhajdin / .eslintrc.cjs
Last active March 29, 2024 09:16
Tailwind CSS Full Course 2023 | Build and Deploy a Nike Website
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],