Skip to content

Instantly share code, notes, and snippets.

@thenewvu
thenewvu / base16-summerfruit.light.icls
Last active August 30, 2016 05:55
base16-summerfruit
<scheme name="Base16-Summerfruit-Light" version="142" parent_scheme="Default">
<option name="LINE_SPACING" value="1.1" />
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="CONSOLE_FONT_NAME" value="InputMonoCompressed Light" />
<option name="CONSOLE_LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_NAME" value="InputMonoCompressed Medium" />
<colors>
<option name="ADDED_LINES_COLOR" value="c918" />
<option name="ANNOTATIONS_COLOR" value="303030" />
<option name="CARET_COLOR" value="3971ed" />
@thenewvu
thenewvu / minimal-ubuntu-setup.sh
Last active October 29, 2015 08:26
minimal-ubuntu-setup
# turnoff vim swapfile
echo "set noswapfile" >> ~/.vimrc
# install graphic manager
sudo apt-get update
sudo apt-get install xserver-xorg
# setup i3 ppa and install i3
sudo sh -c 'echo "deb http://debian.sur5r.net/i3/ $(lsb_release -c -s) universe" >> /etc/apt/sources.list.d/i3.list'
sudo apt-get update
@thenewvu
thenewvu / start_wifi_hotspot.py
Created August 21, 2015 14:14
wifi_hotspot_scripts
import argparse
import subprocess
def main():
argparser = argparse.ArgumentParser()
argparser.add_argument('name')
argparser.add_argument('pwd')
args = argparser.parse_args()
@thenewvu
thenewvu / enter_doanything.py
Last active August 29, 2015 14:21
An ultility python script helps me enter my chroot environment easier
import subprocess
import argparse
def log(msg):
print('# {msg}'.format(msg=msg))
def loghr(msg):
print(72 * '#')
log(msg)
@thenewvu
thenewvu / chroot_from_iso.txt
Last active November 19, 2023 13:57
A guide to create a chroot environment from an Ubuntu iso on Ubuntu
# download ubuntu iso
The iso version should be lower/equal than/to the host version.
# install uck (ubuntu customization kit)
run:
sudo apt-get install uck
# setup chroot environment from iso
@thenewvu
thenewvu / auto_reconnect_wifi.py
Last active August 29, 2015 14:13
script: re-connect the wifi automatically
import ping
import subprocess
import time
import argparse
"""
Requirements:
python 2.7.9 +
pip
pip install ping
@thenewvu
thenewvu / set_display_gamma_linux.cpp
Last active August 29, 2015 14:04
Set display gamma value on Linux using Xlib
#include <iostream>
#include <X11/Xlib.h>
#include <X11/extensions/xf86vmode.h>
/* How to compile:
g++ -o set_gamma_linux.o -c set_gamma_linux.cpp
g++ -o set_gamma_linux set_gamma_linux.o -L/usr/lib -L/usr/local/lib -lX11 -lXxf86vm
*/
void log(const char* message);