Skip to content

Instantly share code, notes, and snippets.

View andyiac's full-sized avatar
😎
JUST BE COOL

andyiac andyiac

😎
JUST BE COOL
View GitHub Profile
@andyiac
andyiac / disable-suspend.md
Created August 9, 2018 02:41 — forked from bzerangue/disable-suspend.md
Disable Sleep/Suspend and WiFi in Ubuntu 16.04 LTS

On Ubuntu 16.04 LTS, I successfully used the following to disable suspend:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

And this to re-enable it:

sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target

@andyiac
andyiac / i3-wm-config
Last active May 14, 2017 12:42
i3wm 配置
# 快速切换 workspace
# quick switch workspace next|pre
bindsym $mod+Ctrl+Right workspace next
bindsym $mod+Ctrl+Left workspace prev
# 修复不透明 bug 需要安装 compton
exec_always compton -f
@andyiac
andyiac / 0_reuse_code.js
Created May 12, 2017 03:29
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@andyiac
andyiac / gist:02ef25252aa5af6cd64833472e9aba45
Created March 15, 2017 07:50 — forked from Bouke/gist:11261620
Multiple Python installations on OS X

Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv instead. If you are looking for the previous version of this document, see the revision history.

$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10

$ pyenv install 2.6.9

@andyiac
andyiac / vimrc
Created February 18, 2017 13:12
my personal use vimrc
set nu
set nocompatible " be iMproved, required
filetype off " required
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
" set the runtime path to include Vundle and initialize
@andyiac
andyiac / GitAutoCommitPush.py
Last active February 20, 2017 01:56
sublime git 自动 commit push 插件,需要提前安装 Git 插件 ,源于GitAutoCommit插件
import functools
import tempfile
import os
import glob
import urllib
from threading import Timer
import sublime
import sublime_plugin
@andyiac
andyiac / gist:7b89839c513076384faa20030a848159
Created December 12, 2016 08:45 — forked from wacko/gist:5577187
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0