Skip to content

Instantly share code, notes, and snippets.

Avatar

Lucas Swart modulitos

View GitHub Profile
View init_multiscreen
#!/bin/bash
# Initializes Bumblebee for multi-screen functionality.
modprobe bbswitch
optirun true
intel-virtual-output
xrandr
View term_multiscreen
#!/bin/bash
# Initializes Bumblebee for multi-screen functionality.
xorg_process=$(ps aux | grep 'Xorg' | awk '{print $2}')
kill -15 $xorg_process
rmmod nvidia
tee /proc/acpi/bbswitch <<<OFF
View reinit_multiscreen
#!/bin/bash
# Restarts Bumblebee for multi-screen functionality.
tee /proc/acpi/bbswitch <<<ON
modprobe bbswitch
optirun true
intel-virtual-output
xrandr
View bash-aliases_bumblebee
# NVIDIA Optimus Aliases - bbswitch
alias tmulti="sudo $HOME/bin/term_multiscreen"
alias rmulti="sudo $HOME/bin/reinit_multiscreen"
alias imulti="sudo /home/lucas/bin/init_multiscreen"
View tmux.conf
unbind C-b
set -g prefix C-t
bind-key t send-prefix
set-option -g history-limit 1000
# set -g @yank_selection "primary"
# # tmux plug-in manager
# set -g @tpm_plugins " \
# tmux-plugins/tpm \
# tmux-plugins/tmux-yank \
@modulitos
modulitos / .tmux.conf
Created Oct 17, 2014
tmux.conf (remote)
View .tmux.conf
unbind C-b
set -g prefix C-z
bind-key z send-prefix
set-option -g history-limit 1000
setw -g mode-keys vi
# unbind [
# bind Escape copy-mode
unbind p
bind p paste-buffer
@modulitos
modulitos / .bashrc
Created Oct 17, 2014
.bashrc (remote)
View .bashrc
# Set colorful prompt
# export PS1='\[\e[1;32m\][\u@\h \W]\$\[\e[0m\] '
# export PROMPT_DIRTRIM=2
export MYPS='$(echo -n "${PWD/#$HOME/~}" | awk -F "/" '"'"'{if (length($0) > 20) { if (NF>4) print $1 "/" $2 "/.../" $(NF-1) "/" $NF; else if (NF>3) print $1 "/" $2 "/.../" $NF; else print $1 "/.../" $NF; } else print $0;}'"'"')'
case "$TERM" in
"dumb")
PS1="> "
;;
xterm*|rxvt*|eterm*|screen*)
PS1='\[\e[1;32m\][\u@\h]$(eval "echo ${MYPS}")$\[\e[0m\] '
View .gitconfig
[user]
name = Luke Swart
email = lukeswart@gmail.com
[core]
editor = vim
[merge]
tool = kdiff3
[alias]
st = status
cm = commit
View wpa_supplicant.asciidoc

WPA Supplicant

wpa_supplicant is a cross-platform WPA Supplicant with support for WPA and WPA2 (IEEE 802.11i/RSN (Robust Secure Network)). It is suitable for desktops, laptops and embedded systems.

wpa_supplicant is the IEEE 802.1X/WPA component that is used in the client

@modulitos
modulitos / forms2accounts.md
Last active Aug 29, 2015
Ideas for a module that automatically handles account generation/updates from forms
View forms2accounts.md

forms2accounts

This is a set of ideas for how an forms2accounts module could work that uses accountdown and is meant to facilitate the creation and updates of accounts from a form. Primary usage would be on the server.

API

var forms2accounts = require('forms2accounts')

or some similar package name. forms2accounts is available, though

You can’t perform that action at this time.