Skip to content

Instantly share code, notes, and snippets.

@1a57danc3
1a57danc3 / FUCK APPLE OCSP
Last active July 28, 2022 12:46
FUCK APPLE OCSP
127.0.0.1 ocsp-lb.apple.com.akadns.net
127.0.0.1 ocsp-cn-lb.apple.com.akadns.net
127.0.0.1 ocsp.apple.com.download.ks-cdn.com
127.0.0.1 k128-mzstatic.gslb.ksyuncdn.com
127.0.0.1 ocsp.apple.com.cdn20.com
127.0.0.1 ocsp.g.aaplimg.com
127.0.0.1 ocsp.apple.com
127.0.0.1 ocsp.digicert.com
@win0err
win0err / install-apple-emoji.md
Last active March 28, 2024 22:29
💃 Apple Emoji on Linux

Install Apple Color Emoji on Linux

  1. Download font.
mkdir ~/.local/share/fonts/
wget https://github.com/samuelngs/apple-emoji-linux/releases/latest/download/AppleColorEmoji.ttf -O ~/.local/share/fonts/AppleColorEmoji.ttf
# or system-wide to /usr/share/fonts/AppleColorEmoji/, for example
  1. Put Apple Color Emoji on the 1st place in /etc/fonts/conf.d/60-generic.conf:
@felipou
felipou / decrypt_dbeaver.py
Last active March 18, 2024 18:46
DBeaver password decryption script - for newer versions of DBeaver
# https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection
# requires pycryptodome lib (pip install pycryptodome)
import sys
import base64
import os
import json
from Crypto.Cipher import AES
@fernandoaleman
fernandoaleman / mysql2-mojave.md
Last active February 7, 2024 19:19
Install mysql2 on MacOS Mojave

For MacOS Catalina, visit Install mysql2 on MacOS Catalina

Problem

Installing mysql2 gem errors on MacOS Mojave.

Solution

Make sure openssl is installed on Mac via Homebrew.

@Yatoom
Yatoom / setup.md
Last active April 19, 2024 06:41
Thinkfan configuration

Thinkfan setup

Note: I configured this thinkfan setup for my old Thinkpad w520 on Ubuntu 17.10.

1. Install necessary programs

Install lm-sensors and thinkfan.

sudo apt-get install lm-sensors thinkfan
@LukeDemons
LukeDemons / append.sh
Created May 28, 2017 15:29
申请软件著作权时,源代码处理脚本
#!/bin/bash
read_dir() {
for item in $(ls $1)
do
if [ -d $1"/"$item ];then
read_dir $1"/"$item
else
file=$1"/"$item
suffix=${file##*.}
@mosquito
mosquito / README.md
Last active April 21, 2024 00:42
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@wbotelhos
wbotelhos / clear-sidekiq-jobs.sh
Last active April 2, 2024 10:04
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@ntrepid8
ntrepid8 / autossh-jump-rtunnel.service
Last active October 7, 2020 01:45
AutoSSH reverse tunnel service config for systemd
[Unit]
Description=AutoSSH reverse tunnel service for jump.you.io 100022 -> 22
After=network.target
[Service]
Environment="AUTOSSH_GATETIME=0"
ExecStart=/usr/bin/autossh -M 0 -o "ExitOnForwardFailure=yes" -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -NR 10022:127.0.0.1:22 user@jump.you.io -i /home/root/.ssh/id_rsa
[Install]
WantedBy=multi-user.target
@nma
nma / UbuntuHiDPI.md
Last active September 11, 2022 13:29
DPI Scaling Fix for Ubuntu on HiDPI 3840x2160 eDP1 with 1920x1080 External Monitor

Based on the contents http://blog.jamiek.it/2015/04/manually-fixing-multiple-screens-with.html

  • Set your Ubuntu to the highest DPI from the System Configurations
  • If not using Ubuntu, then you may need to configure based on instructions here and use a DPI calclator.
  • Please referer to the full blog post and give thanks to the OP.
  • This is just notes and a cached script for my personal laptop
  • My External Monitor (HDMI2) is Above my Laptop Screen (eDP1)