Skip to content

Instantly share code, notes, and snippets.

@nikhan
nikhan / network-ubuntu-macbook.md
Last active May 9, 2017
fix wifi on ubuntu 17/macbook pro 13 2015
View network-ubuntu-macbook.md

Ubuntu 17.04 on 2015 macbook pro 13 - fix for slow wifi

sudo gedit /etc/modprobe.d/brcmfmac.conf

enter:

options brcmfmac qos=0
options brcmfmac nohwcrypt=1
@nikhan
nikhan / i3lock.service
Created Apr 29, 2017
ubuntu/macbook - lock i3 on suspend
View i3lock.service
# source: https://bbs.archlinux.org/viewtopic.php?pid=1170536#p1170536 by 65kid
#
[Unit]
Description=i3lock
Before=sleep.target
[Service]
User=nik
Type=forking
Environment=DISPLAY=:0
@nikhan
nikhan / nowake.service
Last active Jun 27, 2018
ubuntu/macbook 2015 - stop waking up upon suspend fix, as systemd unit
View nowake.service
# ubuntu 17.04 / macbook pro retina 2015 13
#
# place in /etc/systemd/system
# systemctl daemon-reload
# systemctl enable nowake.service
# systemctl start nowake.service
#
# verify with `cat /proc/acpi/wakeup`
# XHC1 should be disabled
# disable more as needed
@nikhan
nikhan / config
Last active Jun 7, 2018
ubuntu/macbook i3 config
View config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@nikhan
nikhan / color_test
Created Apr 29, 2017
bash 256 color test
View color_test
for i in {0..255} ; do
printf "\x1b[48;5;%sm%3d\e[0m " "$i" "$i"
if (( i == 15 )) || (( i > 15 )) && (( (i-15) % 6 == 0 )); then
printf "\n";
fi
done
@nikhan
nikhan / zazen.vim
Created Apr 29, 2017
ubuntu/macbook (fixed for 256 color)
View zazen.vim
" =============================================================================
" File: zazen.vim
" Description: Vim color scheme file
" Maintainer: Zoltan Dezso
" =============================================================================
" (fixed status line)
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
@nikhan
nikhan / .Xresources
Created Apr 29, 2017
ubuntu/macbook
View .Xresources
! for hidpi
Xft.dpi:120
Xft.antialias: true
Xft.rgba: none
!
Xft.hinting: true
Xft.autohint: true
Xft.hintstyle: hintslight
@nikhan
nikhan / .vimrc
Created Apr 29, 2017
ubuntu/macbook
View .vimrc
set t_Co=256
set t_ut=
syntax on
filetype plugin indent on
colorscheme zazen
set nu
set shiftwidth=2
set tabstop=2
@nikhan
nikhan / .Xmodmap
Last active Apr 29, 2017
ubuntu/macbook
View .Xmodmap
! macbook 2015/ubuntu 17.04
! Exchange left Alt and left Win
remove mod1 = Alt_L
remove mod4 = Super_L
add mod1 = Super_L
add mod4 = Alt_L
! Exchange tilde and lesser/greater
keycode 94 = grave asciitilde dead_grave dead_tilde grave asciitilde
keycode 49 = less greater less greater bar brokenbar bar brokenbar
View .Xresources
Xft.antialias: true
Xft.rgba: none
!
Xft.hinting: true
Xft.autohint: true
Xft.hintstyle: hintslight
URxvt*termName: screen-256color
URxvt*scrollBar: false
URxvt*visualBell: false