xrandr --newmode "2560x1080" 159.84 2560 2567 2591 2720 1080 1083 1093 1119 +hsync +vsync
xrandr --addmode HDMI-1 2560x1080
xrandr --output HDMI-1 --mode 2560x1080
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
a2l() { | |
jq '.[] | (.name, .value)' <<-EOF | |
[ | |
{ "name": "x", "value": "v1 vv1" }, | |
{ "name": "y", "value": "v2 vv2" }, | |
{ "name": "z", "value": "v3 vv3" } | |
] | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function normalizePhoneValues(ab, country, ddd, save) { | |
ab.people().forEach((person) => { | |
const name = person.name() | |
person.phones().forEach((phone) => { | |
const oldValue = phone.value() | |
if (!oldValue.startsWith('+')) { | |
let newValue = oldValue.replace(/\D/g, '') | |
if (newValue.startsWith('0')) { | |
newValue = newValue.substr(1) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
jq_tut() { | |
local expr=$1 doc=$2 | |
shift 2 | |
echo "--> cat doc.json" | |
echo "$doc" | |
echo | |
echo "--> # $comment" | |
echo " cat doc.json | jq" "$@" "'$expr'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
# Add the following to your shell init to set up gpg-agent automatically for every shell | |
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
source ~/.gnupg/.gpg-agent-info | |
export GPG_AGENT_INFO | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
################################################################## | |
# Script para aplicar baseline da Proteus # | |
# 12 Jan 2016 - Wendel Amix - v1.0 # | |
################################################################## | |
# | |
# Historico / Atualizacoes | |
# | |
# Data: 17/Jan/2017 - Wendel |
This is a simple launchd config that will start your default
docker-machine on startup. You can customize the machine that is started by updating lines 11 and 16 with the correct machine name.
- Copy the file
com.docker.machine.default.plist
below to~/Library/LaunchAgents/com.docker.machine.default.plist
. - Run the following in a terminal:
launchctl load ~/Library/LaunchAgents/com.docker.machine.default.plist
- Profit!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function str_pad() { | |
local pad_length="$1" pad_string="$2" pad_type="$3" | |
local pad length llength offset rlength | |
pad="$(eval "printf '%0.${#pad_string}s' '${pad_string}'{1..$pad_length}")" | |
pad="${pad:0:$pad_length}" |
NewerOlder