Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I'm currently busy from my primary work. Some delays are expected.

Daun Jeong Mnkai

💭
I'm currently busy from my primary work. Some delays are expected.
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am mnkai on github.
  • I am minori (https://keybase.io/minori) on keybase.
  • I have a public key whose fingerprint is FF4F D8DA 9675 62FB 29C6 A64B DA1C CA6D 0334 3F82

To claim this, I am signing this object:

@Mnkai
Mnkai / key.md
Created Apr 21, 2016 — forked from shobotch/key.md
Twitter (un)official Consumer Key
View key.md

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN
Consumer key:    IQKbtAYlXLripLGPWd0HUA
@Mnkai
Mnkai / minorister.zsh-theme
Last active Feb 8, 2017
Minorister oh-my-zsh theme
View minorister.zsh-theme
# vim:ft=zsh ts=2 sw=2 sts=2
#
# Minorister
# Dirty mix of agnoster and paradox theme
# I missed paradox theme of prezto even after installing oh-my-zsh
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
@Mnkai
Mnkai / brcmfmac43430-sdio.txt
Last active Feb 8, 2017
Hi8 bcm43430 nvram
View brcmfmac43430-sdio.txt
#AP6212_NVRAM_V1.0_20140603_intel
# 2.4 GHz, 20 MHz BW mode
# The following parameter values are just placeholders, need to be updated.
manfid=0x2d0
prodid=0x0726
vendid=0x14e4
devid=0x43e2
boardtype=0x0726
boardrev=0x1101
View byteswap.h
/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@Mnkai
Mnkai / convmdlp2.sh
Last active Mar 20, 2017 — forked from Lana-chan/md.sh
Zsh script for batch converting wav, flac, mp3 files into ATRAC3-LP2 format (MDLP)
View convmdlp2.sh
#!/bin/zsh
mkdir aa3
for file in $PWD/*.(mp3|flac|wav) ; do
fullfilename=$(basename $file)
filename=${fullfilename%.*}
ffmpeg -nostats -loglevel panic -i $fullfilename -ar 44100 temp.wav
# ATRAC3Tool can be found here: https://github.com/Treeki/atrac3tool
@Mnkai
Mnkai / transfermd.sh
Created Mar 20, 2017
Script for transfering preconverted ATRAC3 files to NetMD
View transfermd.sh
#!/bin/zsh
for file in $PWD/*.(aa3) ; do
fullfilename=$(basename $file)
filename=${fullfilename%.*}
# linux-minidisc found here: https://wiki.physik.fu-berlin.de/linux-minidisc/doku.php
sudo ../netmdcli send "$fullfilename" "$filename"
done
@Mnkai
Mnkai / thermalPrint.sh
Last active Oct 25, 2017
Printing markdown document to thermal printer by command line - depends on pandoc and wkhtmltopdf
View thermalPrint.sh
#!/usr/bin/zsh
pandoc "$1" -o "/tmp/print_temp_out.html" --wrap=preserve -f markdown -t html -s
wkhtmltopdf --encoding utf-8 --margin-top 1mm --margin-bottom 7mm --margin-left 0mm --margin-right 0mm --page-height 210mm --page-width 47mm --grayscale "/tmp/print_temp_out.html" "/tmp/print_temp_out.pdf"
lp -d Zjiang-58 "/tmp/print_temp_out.pdf"
rm "/tmp/print_temp_out.pdf"
rm "/tmp/print_temp_out.html"
@Mnkai
Mnkai / mastodon-stop.hook
Created Nov 12, 2017
Pacman compatible libalpm hook for stopping mastodon service before transaction
View mastodon-stop.hook
[Trigger]
Operation = Upgrade
Type = Package
Target = imagemagick
Target = ffmpeg
Target = protobuf
Target = nginx
Target = redis
Target = postgresql
Target = nodejs
@Mnkai
Mnkai / mastodon-bundle.hook
Created Nov 12, 2017
Pacman compatible libalpm hook for updating mastodon bundle (*scripts not included*)
View mastodon-bundle.hook
[Trigger]
Operation = Upgrade
Type = Package
Target = imagemagick
Target = ffmpeg
Target = protobuf
Target = nginx
Target = redis
Target = postgresql
Target = nodejs