Skip to content

Instantly share code, notes, and snippets.

View SuperShinyEyes's full-sized avatar

Seyoung Park SuperShinyEyes

View GitHub Profile
@SuperShinyEyes
SuperShinyEyes / sources.list
Created April 28, 2021 13:10 — forked from rohitrawat/sources.list
Ubuntu 16.04 Xenial default /etc/apt/sources.list
#deb cdrom:[Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)]/ xenial main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@SuperShinyEyes
SuperShinyEyes / convert.py
Created July 30, 2019 10:39 — forked from yokoleia/convert.py
Mass Convert MP4/AVI clips to GIF with a multithreaded Python function, using a variable to set number of threads required.
import imageio
import os, sys
import glob
import threading
import time
class TargetFormat(object):
GIF = ".gif"
MP4 = ".mp4"
AVI = ".avi"
@SuperShinyEyes
SuperShinyEyes / .Xresources
Created June 21, 2019 14:58 — forked from liangzan/.Xresources
Xresources for configuring urxvt
! urxvt
URxvt*buffered: true
URxvt*cursorBlink: true
URxvt*underlineColor: yellow
URxvt*font: xft:inconsolata:size=10:antialias=true
URxvt*depth: 32
URxvt*borderless: 1
URxvt*scrollBar: false
URxvt*loginShell: true
Urxvt*secondaryScroll: true # Enable Shift-PageUp/Down in screen
@SuperShinyEyes
SuperShinyEyes / gmail_imap_example.py
Created November 7, 2018 12:31 — forked from robulouski/gmail_imap_example.py
Very basic example of using Python and IMAP to iterate over emails in a gmail folder/label. http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
#!/usr/bin/env python
#
# Very basic example of using Python and IMAP to iterate over emails in a
# gmail folder/label. This code is released into the public domain.
#
# RKI July 2013
# http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
#
import sys
import imaplib
@SuperShinyEyes
SuperShinyEyes / min-char-rnn.py
Created October 26, 2018 20:52 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@SuperShinyEyes
SuperShinyEyes / table2rst.py
Created July 29, 2018 09:03 — forked from marianoguerra/table2rst.py
csv table 2 rst
'''read a csv file representing a table and write a restructured text simple
table'''
import sys
import csv
def get_out(out=None):
'''
return a file like object from different kinds of values
None: returns stdout
string: returns open(path)
@SuperShinyEyes
SuperShinyEyes / Autoencoders.md
Created May 11, 2018 06:40 — forked from tomokishii/Autoencoders.md
TensorFlow MNIST Autoencoders

README.md

These codes are TensorFlow Autoencoder implementation examples. They are inspired by very educational Keras Blog article.

http://blog.keras.io/building-autoencoders-in-keras.html

Building Autoencodes in Keras

"Autoencoding" is a data compression algorithm where the compression and decompression

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SuperShinyEyes
SuperShinyEyes / afp.conf
Created March 4, 2018 14:20 — forked from oscarcck/afp.conf
afp.conf sample for osx 10.7 lion time machine with netatalk 3.0 afpd on ubuntu 12.04
;
; Netatalk 3.x configuration file
; http://netatalk.sourceforge.net/3.0/htmldocs/afp.conf.5.html
;
[Global]
; Global server settings
vol preset = default_for_all_vol
log file = /var/log/netatalk.log
uam list = uams_dhx.so,uams_dhx2.so