Skip to content

Instantly share code, notes, and snippets.

@kupietools
kupietools / Docker Desktop v 4.0.0 thru 4.22.1 direct download links
Last active May 9, 2024 04:12
List of Direct Download links for Docker Desktop from version 4.0.0 released 2021-08-31 thru 4.22.1 released 2023-08-24, as archived on archive.org
#!/bin/bash
# This script requires docker cli built from master since released version does not support riscv64 manifest annotation
# 1 可以使用binfmt跨平台构建,不需要在native上构建;go版本不低于1.16
# 确定 k8s 版本
# git reset --hard v1.21.1
# 确定配套的 pause 版本
# cat ./kubernetes/build/pause/Makefile | grep "TAG ="
#
# 2 k8s代码的修改:
@hlorand
hlorand / RaspberryPiVideoRecord.sh
Created June 24, 2017 18:37
Video recording and streaming script for Raspberry Pi + Pi Camera
#!/bin/bash
#
# Video recording script for Raspberry Pi. Set bitrate and recording time below
#
# To autostart this script after login, edit /etc/xdg/lxsession/LXDE-pi/autostart and add the following line BEFORE "@xsreensaver":
#
# sh ./RaspberryPiVideoRecord.sh
#
# To convert the output .h264 file to mp4:
#
@ndavison
ndavison / hbh-header-abuse-test.py
Last active May 9, 2024 04:10
Attempts to find hop-by-hop header abuse potential against the provided URL.
# github.com/ndavison
import requests
import random
import string
from argparse import ArgumentParser
parser = ArgumentParser(description="Attempts to find hop-by-hop header abuse potential against the provided URL.")
parser.add_argument("-u", "--url", help="URL to target (without query string)")
const int mod = 998244353;
using lint = long long;
lint ipow(lint x, lint p){
lint ret = 1, piv = x;
while(p){
if(p & 1) ret = ret * piv % mod;
piv = piv * piv % mod;
p >>= 1;
}
return ret;
@alexng353
alexng353 / nextjs.yml
Last active May 9, 2024 04:08
Next JS build test GitHub action
# Sample workflow for building and deploying a Next.js site to GitHub Pages
#
# To get started with Next.js see: https://nextjs.org/docs/getting-started
#
name: Check NextJs build
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
@MuhsinFatih
MuhsinFatih / pythondoneright.md
Last active May 9, 2024 04:07
How to recover from messed up python installation on mac, and never have to mess with apple's shitty python confusion factory

I am assuming you are here because like me, you installed a bazillion different python interpreters on mac and the whole thing is a spagetti. Today, I finally fixed my python installation. Whatever I install for python2 or python3 using pip JUST.WORKS.. My god! finally.

What the hell?

Here is what I had messed up, which you also probably did:

  • I had too many different python interpreters
  • Too many different symlinks which I lost track of
  • almost no package I installed with pip worked without a headache
  • any attempt to fix using online resources made it worse.
@mekeor
mekeor / init.lua
Created March 23, 2023 12:25
A Minimal Neovim Configuration for TypeScript Development featuring Lazy.nvim, LSP, Tree-Sitter, Prettier, Guess-Indent
---- about this neovim-configuration
-- - features: completion, lsp, tree-sitter, formatter, automatic configuration of indendation.
-- - goals: web development with typescript and tsx.
-- - themes: on mac, one-light; otherwise, gruvbox.
---- external setup
-- - install git and neovim. e.g., with guix as package-manager, run:
-- guix install git neovim
@ekreutz
ekreutz / tmux_conda_fix.md
Last active May 9, 2024 04:07
Fix tmux messing with conda path

Fix tmux messing with conda

Problem: When running a conda environment and opening tmux on macOS, a utility called path_helper is run again. Essentially, the shell is initialized twice which messes up the ${PATH} so that the wrong Python version shows up within tmux.

Solution

If using bash, edit /etc/profile and add one line. (For zsh, edit /etc/zprofile)

...
@JakubOboza
JakubOboza / private-docker-regs-with-free-tiers.markdown
Created May 30, 2019 07:15
Private Docker registry with free tiers for Developers.

List of sites with free tier limits

  • Docker Hub - One private repo/image spot for free
  • Three Scale - Very generous free tier 50GB of space, 500 Pulls a month etc..
  • Canister - 20 private repos with almost no limits on free tier
  • Code Fresh - Free tier for developers

Setup your own private registry