Skip to content

Instantly share code, notes, and snippets.

View dberzano's full-sized avatar
🥟
I love pierogi

Dario Berzano dberzano

🥟
I love pierogi
View GitHub Profile
@nibalizer
nibalizer / .bashrc excerpt
Created November 23, 2011 12:30
LESS_TERMCAP so that your manpages are colorful
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
@andrearota
andrearota / asound.conf
Last active November 13, 2016 09:38
Shairport and alsa configuration to make a Raspberry Pi able to receive AirPlay sound streams, equalize the sound with ALSA equal plugin and play them either on HDMI audio interface or Raspberry PWM analog output
# File: /etc/asound.conf
# .alsaequal.bin is automatically created tuning the equalizer with "alsamixer -D equal"
ctl.equal {
type equal;
controls "/home/pi/.alsaequal.bin"
}
pcm.plugequal {
type equal;
@mindscratch
mindscratch / aurora.md
Last active May 19, 2017 15:35
Build Aurora 0.7.1-SNAPSHOT on CentOS 6.5

Build Aurora 0.7.1-SNAPSHOT on CentOS 6.5

I created a CentOS 6.5 Droplet on Digital Ocean with 8GB RAM (you'll need at least 4 for the Java portion of the build), feel free to use any other CentOS 6.5 environment that you can have root on.

Prepare the Environment

First, Mesos 0.21.0+ requires subversion 1.8+ devel package which is not available by default by yum. Add a repo that has subversion-devel 1.8 available, i.e:

Add new repo /etc/yum.repos.d/wandisco-svn.repo, with:

This Gist contains the script and generated output file for an Acer B276HUL.

The pre-generated file below is known to work with:

  • OS X Mavericks
  • OS X Yosemite
  • OS X El Capitan

For El Capitan:

  1. Restart your Mac while holding Command-R: this puts your Mac into Recovery Mode.
@halberom
halberom / play.yml
Last active October 1, 2019 12:57
ansible - example of dynamic even/odd groups
# requirement
# given 2 groups (A and B), target 50% of each for code deploy
- hosts: localhost
tasks:
# this might need to be group_by or add_host
- set_fact:
even: "{{ groups['groupA'][::2] | union(groups['groupB'][::2] }}"
odd: "{{ groups['groupA'][1::2] | union(groups['groupB'][1::2] }}"
#!/bin/bash
# Install sleepwatcher
cd /tmp
curl -O http://www.bernhard-baehr.de/sleepwatcher_2.2.tgz
tar -zxvf sleepwatcher_2.2.tgz
cd sleepwatcher_2.2
sudo mkdir -p /usr/local/sbin /usr/local/share/man/man8
sudo cp sleepwatcher /usr/local/sbin
sudo cp sleepwatcher.8 /usr/local/share/man/man8
sudo cp config/de.bernhard-baehr.sleepwatcher-20compatibility.plist /Library/LaunchAgents
@jhorman
jhorman / twisted_sleep.py
Created March 29, 2011 02:38
Simple non-blocking sleep in twisted.
def sleep(secs):
d = Deferred()
reactor.callLater(secs, d.callback, None)
return d
@tonymtz
tonymtz / gist:714e73ccb79e21c4fc9c
Created November 15, 2014 00:02
Uninstall XQuartz.app from OSX Yosemite
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz
sudo pkgutil --forget org.macosforge.xquartz.pkg
# Log out and log in
@dreampiggy
dreampiggy / mov2webp.sh
Created March 6, 2017 05:31
ffmpeg MOV to Animated WebP
ffmpeg -i input.mov -vcodec libwebp -lossless 1 -q:60 -preset default -loop 0 -an -vsync 0 output.webp
@cjmeyer
cjmeyer / arm-none-eabi-gcc.sh
Last active May 27, 2023 07:47
Bash: Build Binutils, GCC, Newlib, and GDB for ARM EABI (Cross-compiler).
#! /usr/bin/env bash
# Target and build configuration.
TARGET=arm-none-eabi
PREFIX=/opt/arm-none-eabi-4.7.1
# Sources to build from.
BINUTILS=binutils-2.23.1
GCC=gcc-4.7.1
NEWLIB=newlib-1.20.0