Skip to content

Instantly share code, notes, and snippets.

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active January 13, 2025 10:39
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@elvetemedve
elvetemedve / 85-yubikey.rules
Created October 28, 2018 19:59
Lock/unlock user session on Linux with Yubikey
# Yubikey Udev Rule: running a bash script in case your Yubikey is inserted/removed
ACTION=="add", ENV{PRODUCT}=="1050/407/511", ENV{DEVTYPE}=="usb_device", RUN+="/usr/local/bin/pam-session-locker.sh unlock"
ACTION=="remove", ENV{PRODUCT}=="1050/407/511", ENV{DEVTYPE}=="usb_device", RUN+="/usr/local/bin/pam-session-locker.sh lock"
@sunmeat
sunmeat / store.sql
Created January 13, 2025 10:38
simple one-table products database
USE [master]
GO
/****** Object: Database [ATB] Script Date: 13.01.2025 12:38:32 ******/
CREATE DATABASE [ATB]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N'ATB', FILENAME = N'C:\1\ATB.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'ATB_log', FILENAME = N'C:\1\ATB_log.ldf' , SIZE = 2048KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
WITH CATALOG_COLLATION = DATABASE_DEFAULT, LEDGER = OFF
@camargo
camargo / .block
Last active January 13, 2025 10:38
WebGL Animated Rotating Sphere with an Earth Texture
border: no
height: 512
license: gpl-3.0
@kageurufu
kageurufu / piezo_cli.py
Created September 13, 2024 17:13
Updated E3D Revo PZ Probe calibration script
#!/usr/bin/env python
#
# Original piezo_config.py by E3D-Online
# piezo_cli.py by Franklyn Tackitt <im@frank.af>
#
# Requires pyserial
# Optionally requires:
# numpy and scipy for analysis
# plotext for text-mode plotting
@gene1wood
gene1wood / batch-delete-gmail-emails.js
Last active January 13, 2025 10:36
A Google Apps Script script to bulk delete large amounts of email in Gmail while avoiding the error #793 which Gmail encounters normally
/*
This script, when used with Google Apps Scripts, will delete 400 emails and
can be triggered to run every few minutes without user interaction enabling you
to bulk delete email in Gmail without getting the #793 error from Gmail.
Google returns a maximum of 500 email threads in a single API call.
This script fetches 400 threads in case 500 threads is causing timeouts
Configure the search query in the code below to match the type of emails
you want to delete
@timbophillips
timbophillips / local-fonts-icons-angular
Created January 1, 2019 00:44
host roboto font and material icons locally in angular app
//// npm install --save roboto-fontface material-icons
//// put the below stuff into src/styles.scss
// for npm roboto-fontface package (to load local files)
$roboto-font-path: "~roboto-fontface/fonts" !default;
@import "~roboto-fontface/css/roboto/sass/roboto-fontface";
// for npm material-icons package (to load local files)
$material-icons-font-path: '~material-icons/iconfont/';
@jameskyle
jameskyle / manual bonding configuration.sh
Created June 26, 2012 20:04
manual bonding configuration
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
@mondain
mondain / public-stun-list.txt
Last active January 13, 2025 10:32
Public STUN server list
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478
@pgolding
pgolding / remove_adobe_crud.py
Last active January 13, 2025 10:32
Using BeautifulSoup to remove Adobe entity tags (and width/height attributes) from SVG
'''
When rendering SVG files exported from Adobe Illustrator using Phantom JS,
the injected Adobe ENTITY tags can intefere with the render. This removes
the tags and also removes width/height attributes from the SVG tag.
'''
SVG_FILE = 'Some-adobe-illustrator-export.svg'
# By default, BeautifulSoup will ignore the <!ENTITY> array when parsing the file