Skip to content

Instantly share code, notes, and snippets.

View pedrohenriquebr's full-sized avatar
💻
Home office

Pedro Braga pedrohenriquebr

💻
Home office
  • Rio de Janeiro, Brazil
View GitHub Profile
@pedrohenriquebr
pedrohenriquebr / pretty_print.css
Created November 18, 2018 17:50 — forked from pinglamb/pretty_print.css
JSON Pretty Print JS
body { font-family: monospace; font-size: 1.1em; }
ul { margin: 0 0 0 .2em; list-style: none; }
li { padding: 0; margin: 0;}
li:after { content: ','; }
li:last-child:after { content: ''; }
span.object { font-weight: bold; }
span.string, span.string a { color: green; }
@pedrohenriquebr
pedrohenriquebr / post_install.sh
Created November 10, 2018 18:59 — forked from paulness/post_install.sh
Ubuntu post installation script for installing software of your choice.
#!/bin/bash
curl_check ()
{
echo "Checking for curl..."
if command -v curl > /dev/null; then
echo "Detected curl..."
else
echo "Installing curl..."
apt-get install -q -y curl
@pedrohenriquebr
pedrohenriquebr / install.sh
Last active July 28, 2018 16:22 — forked from kbambz/postactivate-env-setup
virtualenvwrapper postactivate and predeactivate scripts to export all a .env file's declarations (foreman style) into your bash environment on activate, then clean them up on deactivate. Also tells npm and rvm to install packages directly into the active virtualenv. Useful for Heroku-hosted project development.
#!/usr/bin/env bash
setup_scripts=(
postactivate-env-setup
predeactivate-env-cleanup
)
target_scripts=(
postactivate
predeactivate
)
@pedrohenriquebr
pedrohenriquebr / sp
Created July 27, 2018 17:50 — forked from wandernauta/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@pedrohenriquebr
pedrohenriquebr / redshift.conf
Created July 24, 2018 21:58 — forked from bcomnes/redshift.conf
My configuration file for Redshift. Place it in ~/.config/ Drag redshift onto the Startup Applications menu to have it boot on start
; Global settings
[redshift]
temp-day=6500K
temp-night=5000
transition=1
;gamma=0.8:0.7:0.8
gamma=1.000:1.000:1.000
location-provider=geoclue
;location-provider=manual
adjustment-method=vidmode