Skip to content

Instantly share code, notes, and snippets.

View noizbuster's full-sized avatar
😎
Awesome

NoizBuster (Wonwoo) noizbuster

😎
Awesome
View GitHub Profile
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@noizbuster
noizbuster / RTL8812AU.sh
Created February 23, 2017 05:12
Install RTL8812AU driver on ubuntu 14.04 (or higher)
#! /bin/bash
sudo apt-get install build-essential git
git clone https://github.com/gnab/rtl8812au.git
cd rtl8812au
make
sudo make install
sudo modprobe 8812au
# edit the ~/.gitconfig
# it's from https://stackoverflow.com/questions/1838873/visualizing-branch-topology-in-git
[alias]
lg = !"git lg1"
lg1 = !"git lg1-specific --all"
lg2 = !"git lg2-specific --all"
lg3 = !"git lg3-specific --all"
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'
@noizbuster
noizbuster / disable_grub_timeout.sh
Created June 7, 2018 05:21
Disable timeout on grub
#!/bin/bash
sudo sed -i -- 's/GRUB_TIMEOUT=10/GRUB_TIMEOUT=-1/g' /etc/default/grub
cat /etc/default/grub | grep GRUB_TIMEOUT
sudo update-grub
@noizbuster
noizbuster / .zshrc
Last active March 3, 2025 06:17
zshrc command alias
# aliases for system
alias apt_upgrade_sequence="sudo apt update && sudo apt dist-upgrade -y && sudo apt autoremove -y && sudo apt autoclean"
alias swapfree="sudo swapoff -a; sudo swapon -a"
# aliases for git
alias gits="git status"
alias gitf="git fetch --all --prune"
alias gitsave="git config credential.helper store"
alias gitreload="git fetch --all && git rev-parse --abbrev-ref HEAD | xargs -I {} git reset origin/{} --hard"
alias gitwip="git add . && git rev-parse --abbrev-ref HEAD | xargs -I {} git commit --no-verify -m \"{}-WIP\""
@noizbuster
noizbuster / my_winston_logger.js
Created January 8, 2019 07:07
my winston logger
const winston = require('winston');
require('winston-daily-rotate-file');
// can replace with values on configuration
const LOG_CONSOLE_LEVEL = 'debug';
const LOG_CONSOLE_JSON = true;
const LOG_FILE_LEVEL = 'info';
const LOG_FILE_NAME = 'VirtualWorkers-%DATE%.log';
// Winston Daily Rotate File : https://github.com/winstonjs/winston-daily-rotate-file
@noizbuster
noizbuster / destructuring.js
Last active March 21, 2019 04:11
Example for destructuring
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment
class TestClass {
constructor({a = 1, b = 2, c, d, ...extra} = {d: 4}) {
this.data = {a, b, c, d};
this.extra = extra;
}
toString() {
console.log(`a = ${this.data.a}, b = ${this.data.b}, c = ${this.data.c}, d = ${this.data.d}, extra = ${this.extra}`)
}
@noizbuster
noizbuster / Ubuntu.md
Last active November 10, 2022 07:36
Ubuntu Setting

remove unnecessary apps

  • (under 18.04) amazon app4
  • games (like sudoku...)

update ubuntu

sudo apt update
sudo apt dist-upgrade && sudo apt autoremove && sudo apt autoclean
@noizbuster
noizbuster / launching_workspace.sh
Created November 17, 2020 05:30
Executes terminal and editor and move them to specific gnome workspace
#!/bin/bash
backend_path="/home/username/project/admin/my-project-backend"
frontend_path="/home/username/project/admin/my-project-frontend"
terminator --working-directory=$backend_path -T ADMIN_BACKEND &&
until wmctrl -l | grep -q "ADMIN_BACKEND";
do
sleep 0.1
done
wmctrl -r ADMIN_BACKEND -t 2
@noizbuster
noizbuster / react.page.jsx
Created November 19, 2020 00:11
how to print react component as full-size
function ReactPage(props) {
const printingTarget = useRef(null);
const iframe4print = useRef(null);
function onPrintButtonClick() {
let content = printingTarget.current;
let pri = iframe4print.current.contentWindow;
pri.document.open();
pri.document.write(`<html lang="ko">${document.head.innerHTML}<body>${content.innerHTML}</body></html>`);
pri.document.close();