Skip to content

Instantly share code, notes, and snippets.

View SuperShinyEyes's full-sized avatar

Seyoung Park SuperShinyEyes

View GitHub Profile
@SuperShinyEyes
SuperShinyEyes / localRealmTableView.swift
Created August 30, 2017 09:11
Save&Load Data locally in a persistent way using Realm
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = UINavigationController(rootViewController: ViewController(style:.plain))
@SuperShinyEyes
SuperShinyEyes / logger.swift
Last active September 5, 2017 14:00
swift Logger
import Foundation
enum LogEvent: String {
case error = "[‼️]"
case info = "[ℹ️]"
case debug = "[💬]"
case verbose = "[🔬]"
case warning = "[⚠️]"
case severe = "[🔥]"
}
@SuperShinyEyes
SuperShinyEyes / mpv.sh
Created September 9, 2017 13:44
mpv & youtube-dl
--ytdl-format='bestvideo[ext=mp4][width<=1920][height<=1080]+bestaudio[ext=m4a]'
mpv link_to_youtube_vid --no-video
@SuperShinyEyes
SuperShinyEyes / AllAboutGit.md
Last active December 7, 2017 13:33
All git stuffs

List all tracked files

git ls-tree -r master --name-only

cd path/to/project-b git remote add project-a path/to/project-a git fetch project-a git merge --allow-unrelated-histories project-a/master # or whichever branch you want to merge git remote remove project-a

@SuperShinyEyes
SuperShinyEyes / .bash_profile
Created September 20, 2017 17:14
bash/git aliases
alias gs='git status '
alias ga='git add '
alias gb='git branch '
alias gc='git commit'
alias gd='git diff'
alias go='git checkout '
alias gk='gitk --all&'
alias gx='gitx --all'
alias got='git '
@SuperShinyEyes
SuperShinyEyes / bash.md
Last active January 15, 2018 19:06
Bash commands

Packages...

apt-cache search name
apt-cache policy name
modinfo name
dpkg -l | grep name

puppet agent -t  // Update puppet list in /etc/apt/sources.list.d/name.list

Get GPU info

@SuperShinyEyes
SuperShinyEyes / boxstarter.ps1
Created January 3, 2018 15:53 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <[email protected]>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:

First ssh into kosh.org.aalto.fi

Then run

#/usr/bin/python3

from concurrent.futures import ThreadPoolExecutor
import subprocess

paniikki = [
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_adisk._tcp</type>
<txt-record>sys=waMa=0,adVF=0x100</txt-record>
<txt-record>dk0=adVN=Time Capsule,adVF=0x82</txt-record>
</service>
<service>
@SuperShinyEyes
SuperShinyEyes / afp.conf
Created March 4, 2018 14:20 — forked from beshkenadze/afp.conf
Netatalk config for TimeMacine
;/usr/local/etc/afp.conf
; Netatalk 3.x configuration file
;
[Global]
; Global server settings
vol preset = default_for_all_vol
hostname = TimeCapsule
log file = /var/log/netatalk.log
log level = default:info