Skip to content

Instantly share code, notes, and snippets.

@terrancesnyder
terrancesnyder / regex-japanese.txt
Created November 7, 2011 14:05
Regex for Japanese
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([一-龯])
Regex for matching Hirgana or Katakana
([ぁ-んァ-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-んァ-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)
@hgrimm
hgrimm / 0-README.txt
Created May 21, 2024 04:10 — forked from yan-foto/0-README.txt
DeDRM Adobe Digital Edition Books
Convenient DeDRM Scripts
-------------------------
**NOTE**: read https://blog.quaintous.com/2021/02/16/remove-drm-from-ebooks/ to find out what this gist is good for.
* ./init.sh: extracts Adobe Digital Editions private key and required files to DeDRM.
* ./dedrm: removes DRM from given ebook (pdf/epub)
If you are using this for the first time, make sure that you have authenticated your Adobe Digital Editions (ADE) and run './init.sh'. Import any DRM-protected file into ADE and run 'dedrm.sh':
@LukeZGD
LukeZGD / ios-downgrade-dualboot.md
Last active May 21, 2024 04:10
Downgrade and dualboot status of almost all iOS devices

Downgrade and dualboot status of almost all iOS devices

UPDATED: 2024-05-19

@ppmathis
ppmathis / debian-stretch-fde.md
Last active May 21, 2024 04:05
Guide which explains an installation of Debian Stretch with full disk encryption (including "/boot" partition, containing initramfs+kernel) by using Debian Jessie Live.

Debian Stretch - Full Disk Encryption

This documents guides you through the process to install Debian Stretch with Full Disk Encryption. The following requirements exist:

  • Mainboard with UEFI-Support
  • Debian Stretch Live CD booted from UEFI
  • Two unformatted, unpartitioned HDDs/SSDs for Software RAID1 with mdmadm

After following this guide, you will end up with a setup like this:

  • Redundant GRUB Standalone EFI installation on both disks
@DavidAce
DavidAce / nvidia-tdp.service
Last active May 21, 2024 03:58
Nvidia power limit at boot
[Unit]
Description=Set NVIDIA power limit above default
[Service]
Type=oneshot
ExecStartPre=/usr/bin/nvidia-smi -pm 1
ExecStart=/usr/bin/nvidia-smi -pl 275
@theycallmeloki
theycallmeloki / Raspberry Pi 4 x 6 cluster 65B Llama runner gist
Last active May 21, 2024 03:57
an ansbile script that quickly bootstraps a Pi 4 cluster with tools required to run a 65B llama model
You will need the following two files, be sure to change the IP address in both sections, the `hostfile_contents`
as well as the ansible inventory section to reflect your configuration
Rest of the steps should run parallely across the different machines, for any updates to this script,
check this thread: https://github.com/ggerganov/llama.cpp/issues/2164#issuecomment-1639640846
If you want an automated way to do this in the future and would like an opionated setup procedure,
check this repo: https://github.com/theycallmeloki/edith-cli
@pandax381
pandax381 / ix3315.startup-config
Last active May 21, 2024 03:56
IX3315 にフレッツ光クロス2回線(OCNバーチャルコネクトおよびv6プラス固定IP)を収容するためのコンフィグ
! NEC Portable Internetwork Core Operating System Software
! IX Series IX3315 (magellan-sec) Software, Version 10.7.18, RELEASE SOFTWARE
! Compiled Oct 25-Tue-2022 12:28:03 JST #2
! Current time Apr 26-Wed-2023 16:52:00 JST
!
timezone +09 00
!
logging buffered 819200
logging subsystem flt warn
logging subsystem mape debug
@ahmadrosid
ahmadrosid / write-fixer.py
Created April 17, 2024 10:02
Fixed typos, spelling mistakes, and grammar while maintaining clarity and a concise tone using Claude.
import sys
import anthropic
from dotenv import load_dotenv
load_dotenv()
client = anthropic.Anthropic()
prompt_template = """
Please review and edit the following text to ensure it is grammatically correct, clear, and concise. Aim to maintain a casual tone without being overly informal. Provide suggestions for improvement and explain any changes you make. Do not add double quotes in you rewrite answer. Answer in direct response.
export blah="$(grep client.so /proc/$(pidof hl2_linux)/maps | head -n 1 | cut -d - -f1)" ; export DDDD="$(printf "0x%X\n" $((0x$blah + 0x3c856f)))" ; export FFFD="$(printf "0x%X\n" $(($DDDD + 4)))" ; grep -a -insecure "/proc/$(pidof hl2_linux)/cmdline" && sudo gdb -p $(pidof hl2_linux) -ex "set {int}$DDDD = 0x90909090" -ex "set {short}$FFFD = 0x9090" -batch