Skip to content

Instantly share code, notes, and snippets.

View henriquegogo's full-sized avatar

Henrique Gogó henriquegogo

View GitHub Profile
@henriquegogo
henriquegogo / dwm-config.h
Last active August 18, 2021 05:09
Customize DWM
/* See LICENSE file for copyright and license details. */
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "monospace:size=10" };
static const char dmenufont[] = "monospace:size=10";
static const char col_gray1[] = "#000000";
@henriquegogo
henriquegogo / .xbindkeysrc
Created April 13, 2015 01:49
Key binds to change volume using xbindkeys
"amixer -q sset Master 3%+"
m:0x0 + c:123
XF86AudioRaiseVolume
"amixer -q sset Master 3%-"
m:0x0 + c:122
XF86AudioLowerVolume
"amixer -q sset Master toggle"
m:0x0 + c:121
@henriquegogo
henriquegogo / .Xresources
Created April 1, 2015 04:58
XTerm configuration file
XTerm*selectToClipboard: true
XTerm*faceName: DejaVu Sans Mono:pixelsize=13
XTerm*background: #111111
XTerm*foreground: #eeeeee
XTerm*color0: #000000
XTerm*color1: #9e1828
XTerm*color2: #aece92
XTerm*color3: #968a38
XTerm*color4: #414171
XTerm*color5: #963c59
@henriquegogo
henriquegogo / dwmstatus.sh
Last active August 29, 2015 14:14
dwm statusbar
#!/usr/bin/env sh
xsetroot -solid black
while true
do
dropbox="Dropbox: $(dropbox status | head -1) |"
ip="$(ifconfig eth0 | grep 'inet addr' | cut -d: -f2 | cut -d' ' -f1) |"
volume="Volume: $(amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/') |"
battery="Battery: $(acpi -b | awk '{ print $4 $5 }' | sed 's/,/ \/ /g') |"
datetime=$(date)
@henriquegogo
henriquegogo / .ssh_config
Created February 2, 2015 17:18
Use SSH through HTTP proxy
# ~/.ssh/config
Host foobar-proxy.example.com
HostName foobar.example.com
ProxyCommand nc -X connect -x proxyhost:proxyport %h %p
ServerAliveInterval 10
@henriquegogo
henriquegogo / resize.sh
Created December 20, 2014 01:58
Resize all images from folder
for file in *.JPG; do convert $file -resize 1024x768 resized-$file; done
@henriquegogo
henriquegogo / curltime.sh
Last active August 29, 2015 14:10
Get request time
curl -s -w "%{time_total}\n" -o /dev/null www.example.com
@henriquegogo
henriquegogo / .xsessionrc
Created October 15, 2014 03:45
Show Dropbox indicator in Elementary OS
export DROPBOX_USE_LIBAPPINDICATOR=1
@henriquegogo
henriquegogo / personClass.lua
Last active September 5, 2022 13:39
Simple Lua Class
#!./bin/lua
Person = {} do
setmetatable(Person, { __index = string }) -- Optional. Inheritance
local personMessage;
function Person.new(name, age)
local self = setmetatable({}, { __index = Person })
@henriquegogo
henriquegogo / .bashrc
Last active August 29, 2015 14:01
Show git branch on commandline path
# Download this file https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh to ~/.git-prompt.sh
source ~/.git-prompt.sh
export PS1='\[\e[1;33m\]'$PS1'\[\e[1;32m\]$(__git_ps1 "(%s) ")\[\e[m\]'