Skip to content

Instantly share code, notes, and snippets.

@nomicode
nomicode / export_chat.py
Last active October 31, 2018 19:06
Export chat logs from Messages.app
#!/usr/bin/env python
import sys
import urllib
import urlparse
import base64
import mimetypes
import cgi
from os import path
@nomicode
nomicode / process.py
Created December 27, 2021 05:17
Paste a screenshot on top of a template image to produce an output image with a drop shadow
#!/usr/bin/env python3
# This script pastes the input image on top of the template image and writes out
# a new file. The reference template image includes a drop shadow.
#
# To get this script working on macOS, install the following dependencies:
#
# $ brew install pngquant
# $ python3 -m pip install Pillow pngquant
#
@nomicode
nomicode / cpulimit.py
Created June 26, 2022 16:47 — forked from anonymous/cpulimit.py
reduce the cpu time of a process by pausing and resuming it repeatedly
#!/usr/bin/env python
import time, os, sys, signal
sleeptime = waketime = 0.01
def send(signal, pids):
for pid in pids:
os.kill(pid, signal)
@nomicode
nomicode / keybase.md
Created November 8, 2022 17:51
Keybase

Keybase proof

I hereby claim:

  • I am nomirose on github.
  • I am nomirose (https://keybase.io/nomirose) on keybase.
  • I have a public key ASDXHQwTX6CwxbN43nQH12_e-FXBGMzypjnJyrcPO6cAUAo

To claim this, I am signing this object:

@nomicode
nomicode / setdate.py
Last active April 17, 2023 15:16
setdate
#!/usr/bin/env python3
def main():
pass
if __name__ == "__main__":
main()
@nomicode
nomicode / cspell.md
Last active November 9, 2023 01:15
Linters

‎‎​

@nomicode
nomicode / btSignal.sh
Created March 31, 2024 17:18 — forked from mikerr/btSignal.sh
Bluetooth RSSI signal strength
# install bluetooth tools
sudo apt-get install --no-install-recommends bluetooth
# find MAC address (needs to be discoverable)
hcitool scan
# ping it
sudo l2ping -c 1 12:34:56:78:90
# Connect by MAC
@nomicode
nomicode / README.md
Last active April 23, 2024 16:40
VS Code keybindings
@nomicode
nomicode / .editorconfig
Last active April 27, 2024 14:12
Defaults for EditorConfig
# My defaults for EditorConfig
# https://gist.github.com/nomicode/8ac796041f358dd42c638dfe4c93ed2
# See also:
# - https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
root = true
[*]
charset = utf-8
@nomicode
nomicode / .markdownlint.yaml
Last active April 27, 2024 14:06
My defaults for markdownlint
# My defaults for markdownlint
# https://gist.github.com/nomicode/fecf294dd1e1abdefc8ea31bb9b57eb9/
default: true
# Disables rules that may conflict with Prettier
# https://github.com/DavidAnson/markdownlint/blob/main/style/prettier.json
extends: markdownlint/style/prettier
# Line length