Search This Blog

Saturday, March 11, 2017

Generate random noise image using ImageMagick Convert

Generate 1024x1024 random noise jpg:

convert -size 1024x1024 xc: +noise Random random.jpg


* xc: X Constant Image

References

Sh!t boy


Sh!t boy~

This character is used for animated icon on desktop in Windows.

Wednesday, March 8, 2017

Password management in *nix system

pwgen

password generator

Usage example:
  • Single 16-length password generation
    $ pwgen -1 16
manage encrypted password databases

pass

standard *nix password manager
https://www.passwordstore.org/

Init password store

Init or re-init password store using gpg-id.
$ pass init gpg-id
pass uses the last subkey of the gpg-id (1).
  • gpg-id is a registered gpg id (uid) which can be found using:
    $ gpg --list-keys

Init git repo for password store

$ pass git init  
Initialized empty Git repository in /Home/user/.password-store/.git/

Chrome/Firefox plugin

https://github.com/dannyvankooten/browserpass

References

1. "https://lists.zx2c4.com/pipermail/password-store/2014-September/001131.html"

Sunday, March 5, 2017

gpg (GnuPG or GNU Privacy Guard)

List keys

$ gpg --list-keys

Add a key

$ gpg --gen-key

Examples

gpg -e -r user hello.txt

xxd -p hello.txt.gpg > hello.txt.gpg.bin

xxd -r -p hello.txt.gpg.bin > decode.txt.gpg

gpg -d decode.txt.gpg

References

1. "Python GPG example"
2. "Creating a new GPG key with subkeys"

PHP tutorial

Learn PHP

https://www.tutorialspoint.com/php/index.htm

Learn PHP-7

https://www.tutorialspoint.com/php7/index.htm

Friday, March 3, 2017

Lode Runner for MAME

Lode Runner (set 1) ROM

Run

$ ./mame64 ldrun

Lode Runner (set 2) ROM

Run

$ ./mame64 ldruna

Sexy parodius in Mac OS

MAME

i. Install MAME

ii. Install SDL runtime

Download Sexy Parodius

i. sexyparo.zip

ii. konamigx.zip

Run game

$ ./mame64 sexyparo
  • This game supports game controllers (eg. xbox controller)

Saturday, February 25, 2017

git show only staged files

git diff --name-only --cached

--name-only: show only file names
--cached: --cached is a synonym of --staged, so it means the staged and the latest commit that is ommited

https://stackoverflow.com/questions/33610682/git-list-of-staged-files

Blog Archive