Skip to content

Instantly share code, notes, and snippets.

@ysheng26
ysheng26 / multiple_ssh_setting.md
Created June 30, 2016 19:59 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@ysheng26
ysheng26 / gist:bc0e0cdf740e2934bc467dfdc081b8e7
Last active July 19, 2016 01:11
Microsoft Natural Ergonomic 4000 for Ubuntu
On Xubuntu 13.10 (perhaps on Ubuntu 13.10 too) the same can be done as follows:
Edit key mappings in /lib/udev/hwdb.d/60-keyboard.hwdb:
###########################################################
# Microsoft
###########################################################
# Microsoft Natural Ergonomic Keyboard 4000
keyboard:usb:v045Ep00DB*
@ysheng26
ysheng26 / keyrepeat.shell
Created April 24, 2018 15:31 — forked from kconragan/keyrepeat.shell
Enable key repeat in Apple Lion for Sublime Text in Vim mode
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key
# that enables you to choose a character from a menu of options. If you are on Lion
# try it by pressing and holding down 'e' in any app that uses the default NSTextField
# for input.
#
# It's a nice feature and continues the blending of Mac OS X and iOS features. However,
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode,
# as it means you cannot press and hold h/j/k/l to move through your file. You have
# to repeatedly press the keys to navigate.
@ysheng26
ysheng26 / foo.log
Created October 17, 2018 01:21 — forked from ibeex/foo.log
Flask logging example
A warning occurred (42 apples)
An error occurred
@ysheng26
ysheng26 / ffmpeg-compress-mp4
Created July 25, 2019 14:27 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@ysheng26
ysheng26 / keys.go
Created January 23, 2020 19:04 — forked from sdorra/keys.go
Golang RSA Key Generation
/*
* Genarate rsa keys.
*/
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"