Skip to content

Instantly share code, notes, and snippets.

@roastedmonk
roastedmonk / luamacros.lua
Created May 29, 2021 06:19 — forked from trevren11/luamacros.lua
LuaMacros examples for second keyboard for use with debugging and android studio
-- assign logical name to macro keyboard
-- lmc_assign_keyboard('MACROS')
-- lmc_minimize();
-- lmc_reset();
lmc_say('Loading keyboard configuration')
lmc.minimizeToTray = false
-- lmc_minimize()
-- lmc_load('E:\\lmc.lua')
-- The function returns title of active window. Useful if you want different behaviour of macros depending of active application.
@roastedmonk
roastedmonk / NSDateFormatter cheat sheet
Created April 13, 2021 16:09 — forked from romaonthego/NSDateFormatter cheat sheet
Date Formats for NSDateFormatter
a: AM/PM
A: 0~86399999 (Millisecond of Day)
c/cc: 1~7 (Day of Week)
ccc: Sun/Mon/Tue/Wed/Thu/Fri/Sat
cccc: Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday
d: 1~31 (0 padded Day of Month)
D: 1~366 (0 padded Day of Year)
@roastedmonk
roastedmonk / cheatsheet.ps1
Created June 13, 2020 22:40 — forked from pcgeek86/cheatsheet.ps1
PowerShell Cheat Sheet / Quick Reference
Get-Command # Retrieves a list of all the commands available to PowerShell
# (native binaries in $env:PATH + cmdlets / functions from PowerShell modules)
Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft*
Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item"
Get-Help # Get all help topics
Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page)
Get-Help -Name Get-Command # Get help for a specific PowerShell function
Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command
@roastedmonk
roastedmonk / text_preprocessing.py
Created June 8, 2020 06:52 — forked from MrEliptik/text_preprocessing.py
A python script to preprocess text (remove URL, lowercase, tokenize, etc..)
import re, string, unicodedata
import nltk
import contractions
import inflect
from nltk import word_tokenize, sent_tokenize
from nltk.corpus import stopwords
from nltk.stem import LancasterStemmer, WordNetLemmatizer
def replace_contractions(text):
"""Replace contractions in string of text"""
@roastedmonk
roastedmonk / raspi-ympd.markdown
Last active January 20, 2019 09:00
Installing ympd on the Rasppberry Pi #rasppberry-pi

ympd on the Raspberry Pi

Install MPD first

Install and setup is as simple as it gets to install any software on linux:

sudo apt-get update
sudo apt-get upgrade

And then: