Skip to content

Instantly share code, notes, and snippets.

View lincerely's full-sized avatar
🕹️

Lincerely lincerely

🕹️
View GitHub Profile
@ideoforms
ideoforms / sox-cheat-sheet.sh
Last active July 11, 2025 21:29
sox cheat sheet
################################################################################
# sox cheat sheet
################################################################################
# Example commands for the sox command-line audio processing tool,
# for manipulating or batch processing audio files.
################################################################################
# Daniel Jones <[email protected]>
################################################################################
################################################################################
@joannakl
joannakl / resources_APS.md
Last active February 26, 2025 11:29
Resources for Algorithmic Problem Solving
@datlife
datlife / README.md
Last active February 23, 2025 23:19
Build LLVM / Clang on MacOS

Build LLVM / Clang on MacOS

Problem

Built-in Clang / LLVM shipped by Xcode does not support Leak Santizer (-fsantize=leak) feature. For example, this code has memory leak:

// File: main.c

#include <stdlib.h>
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active July 17, 2025 10:31
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@jnbdz
jnbdz / firefox_bookmarks.sh
Last active August 23, 2024 08:59
Get FireFox bookmarks with the help of the terminal
#!/usr/bin/env bash
firefoxbookmarks() {
mkdir -p /tmp/bookmark/ && \
cp ~/.mozilla/firefox/0fkse04m.default/places.sqlite /tmp/bookmark && \
sqlite3 -line /tmp/bookmark/places.sqlite 'select moz_places.url, moz_bookmarks.title from moz_bookmarks join moz_places on moz_bookmarks.fk = moz_places.id' && \
rm /tmp/bookmark/places.sqlite
}
@ozgurshn
ozgurshn / NLTokenizer.swift
Created March 10, 2019 19:59
NLTokenizer
import NaturalLanguage
let text = "All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood."
let tokenizer = NLTokenizer(unit: .word)
tokenizer.string = text
//let tokenArray = tokenizer.tokens(for: strRange)
tokenizer.enumerateTokens(in: text.startIndex..<text.endIndex) { tokenRange, _ in
print(text[tokenRange])
return true
@uchcode
uchcode / Create-standalone-Mac-OS-X-applications-with-Python.md
Last active February 5, 2025 15:20
PythonでスタンドアロンのMac OS Xアプリケーションを作成する

PythonでスタンドアロンのMac OS Xアプリケーションを作成する

Pythonのプログラムを配布可能なアプリケーションを作成する方法について扱います。

Pythonプログラムの実行方式

コンピュータが理解できるのは突き詰めると、0と1だけです。そのため、プログラムを実行するには「プログラミング言語で書かれたテキストのプログラム」を0と1に変換する必要があります。そのやり方には2つあり、ひとつはコンパイラを使うもので、もうひとつはインタプリタを使うものです。

以下に両者の違いについて記載します。

from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
from spell import *
updater = Updater(token="")
dispatcher = updater.dispatcher
import logging
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.INFO)
@eush77
eush77 / log.dc
Last active September 14, 2023 02:55
Natural logarithm in Unix DC http://enwp.org/dc_(computer_program)
# L (x -- y)
# Natural logarithm of `x`.
# By Taylor series expansion of `ln(x)=ln((1+t)/(1-t))`.
# See https://en.wikipedia.org/wiki/Natural_logarithm#Numerical_value
[ 1-d2+/
d2*Sk # Initialize multiplier
d*Sy # Initialize multiplier factor
0Ss # Initialize accumulator
10K^Sp # Initialize 10^k power
[ d1r/lk*ls+lsrdss # Update accumulator
@yancyn
yancyn / git-svn.md
Last active March 2, 2025 18:05
Migrate Archive Google Code SVN to Git

Migrate Archive Google Code SVN to Git

Requirements

  • git
  • git-svn

Setup¹

$ sudo apt-get install git
$ sudo add-apt-repository ppa:git-core/ppa