Skip to content

Instantly share code, notes, and snippets.

@stecman
stecman / Bake_codepoints_python.md
Last active March 5, 2025 14:04
Render glyphs to file with Python

Bake glyphs from fonts to image files (Python)

This is an appendix item for Unicode Input Terminal.

Protoype code to pre-render 240x240 screens, each with a glyph and codepoint metadata.

# Download Unicode metadata
wget https://unicode.org/Public/UNIDATA/UnicodeData.txt
wget https://unicode.org/Public/UNIDATA/Blocks.txt
@shospodarets
shospodarets / delete-local-branches-except-the-current.sh
Last active March 5, 2025 14:02
Delete all the local Git branches except the current one
#!/usr/bin/env bash
git branch | grep -v (git rev-parse --abbrev-ref HEAD) | xargs git branch -D
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active March 5, 2025 14:02
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@VirtuBox
VirtuBox / microsoft-dns-block.txt
Last active March 5, 2025 13:58
Blocking Microsoft DNS hosts file
0.0.0.0 feedback.microsoft-hohm.com
0.0.0.0 search.msn.com
0.0.0.0 a.ads1.msn.com
0.0.0.0 a.ads2.msn.com
0.0.0.0 a.rad.msn.com
0.0.0.0 ac3.msn.com
0.0.0.0 ads.msn.com
0.0.0.0 ads1.msn.com
0.0.0.0 b.ads1.msn.com
0.0.0.0 b.rad.msn.com
@xyzulu
xyzulu / enhance_control_backup.sh
Last active March 5, 2025 13:57
Backup Enhance control panel server assets that are needed in the event of a server disaster
#!/bin/bash
########################################################################################################
# At the least you will need to set the remote transfer credentials. We suggest using ssh keys.
# For example: scp -i "/home/user/.ssh/keyfile" "$ARCHIVE_NAME" user@destination:/path
########################################################################################################
# Set variables
TEMP_DIR="/temp"
TIMESTAMP=$(date +%Y%m%d%H%M%S)
@rxaviers
rxaviers / gist:7360908
Last active March 5, 2025 13:57
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:
@BlueSkyXN
BlueSkyXN / BaiduPan-Checkin.py
Created August 8, 2024 02:13
BaiduPan-Checkin.py
import requests
import time
import re
import os
# 从环境变量中获取 Cookie
COOKIES = os.environ.get('BAIDU_COOKIE', '')
HEADERS = {
'Connection': 'keep-alive',
@esotericenderman
esotericenderman / bases.py
Created March 5, 2025 13:56
Converts a number into a specfied base.
# Converts a number into a specfied base.
characters = {
0: "0",
1: "1",
2: "2",
3: "3",
4: "4",
5: "5",
6: "6",
7: "7",
@tylerneylon
tylerneylon / copy.lua
Last active March 5, 2025 13:56
How to deep copy Lua values.
-- copy.lua
--
-- Lua functions of varying complexity to deep copy tables.
--
-- 1. The Problem.
--
-- Here's an example to see why deep copies are useful. Let's
-- say function f receives a table parameter t, and it wants to