Skip to content

Instantly share code, notes, and snippets.

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

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 April 29, 2017 22:01
ubuntu/macbook - lock i3 on suspend
# 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 June 27, 2018 07:02
ubuntu/macbook 2015 - stop waking up upon suspend fix, as systemd unit
# 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 June 7, 2018 00:35
ubuntu/macbook i3 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 April 29, 2017 06:42
bash 256 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 April 29, 2017 06:41
ubuntu/macbook (fixed for 256 color)
" =============================================================================
" 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 April 29, 2017 06:41
ubuntu/macbook
! for hidpi
Xft.dpi:120
Xft.antialias: true
Xft.rgba: none
!
Xft.hinting: true
Xft.autohint: true
Xft.hintstyle: hintslight
@nikhan
nikhan / .vimrc
Created April 29, 2017 06:39
ubuntu/macbook
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 April 29, 2017 06:39
ubuntu/macbook
! 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
@nikhan
nikhan / .Xresources
Created March 11, 2017 18:01
.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