Skip to content

Instantly share code, notes, and snippets.

@miroslavtamas
miroslavtamas / install-apache-maven-3.3.9.sh
Created April 22, 2016 10:48
Install Apache Maven 3.3.9 on CentOS
#!/bin/sh
wget http://www.eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
tar xzf apache-maven-3.3.9-bin.tar.gz
mkdir /usr/local/maven
mv apache-maven-3.3.9/ /usr/local/maven/
alternatives --install /usr/bin/mvn mvn /usr/local/maven/apache-maven-3.3.9/bin/mvn 1
alternatives --config mvn
@AndreasPizsa
AndreasPizsa / gist:4eea7957553ed661c4df
Created November 7, 2014 15:19
Fix Bluetooth Audio hickups on Mac OS X
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 48
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 40
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 48
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Max" 53
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Min" 48
defaults write com.apple.BluetoothAudioAgent "Stream – Flush Ring on Packet Drop (editable)" 30
defaults write com.apple.BluetoothAudioAgent "Stream – Max Outstanding Packets (editable)" 15
defaults write com.apple.BluetoothAudioAgent "Stream Resume Delay" "0.75"
@svdgraaf
svdgraaf / build
Created September 20, 2010 05:59
nginx + geo ip + secure download
$ ./configure --add-module=/home/svdgraaf/tmp/nginx/ngx_http_bytes_filter_module-57365655ee44 --with-http_geoip_module --add-module=/home/svdgraaf/tmp/nginx/ngx_secure_download
@Timopheym
Timopheym / sync_pins.js
Last active September 9, 2023 17:09
Small script to download your pinterest boards to your machine. Limit 50 pins per board... but you can download all pins from board using instruction inside ;)
var request = require("request");
var fs = require("fs");
var api_root = 'http://widgets.pinterest.com/v3/pidgets/boards/';
var sync_dir = './images', image_url, image_path, current_user_boards, current_user_name, board_dir;
var users = {
timopheym : [
'skatches',
'home',
@ragul28
ragul28 / webhook_install.sh
Created May 18, 2020 17:01
Easy webhook installation script to systemd.
#!/bin/bash
echo "[-] Installing webhook.."
wget https://github.com/adnanh/webhook/releases/download/2.6.11/webhook-linux-amd64.tar.gz
tar -xvf webhook*.tar.gz
sudo mv webhook-linux-amd64/webhook /usr/local/bin
rm -rf webhook-linux-amd64*
echo "[ok] Installing webhook."
@suhlig
suhlig / install-tmux
Last active October 12, 2023 21:25 — forked from philipsd6/install-tmux
Install tmux on rhel/centos
# Install tmux on rhel/centos 7
# What do we want?
libeventversion=2.1.11
tmuxversion=3.1
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
@domenic
domenic / angularpromise.js
Created January 21, 2016 23:28
How to subclass a promise
// ES6
class AngularPromise extends Promise {
constructor(executor) {
super((resolve, reject) => {
// before
return executor(resolve, reject);
});
// after
}
@bdpwebdesign
bdpwebdesign / key_mapping.md
Last active November 29, 2023 15:59
Apple Magic Keyboard mapping for Linux Mint

Map an Apple Magic Keyboard to a Linux machine

Configured for a Mac-like experience

Apple Magic Keyboard 2: Model A1644 (same as MLA22LL/A ?)

Mapping for Linux Mint 18 Cinnamon 64-bit

xmodmap source

@haacked
haacked / TestHelper.cs
Created January 14, 2012 07:25
String Comparison Unit Test Helper
public static class TestHelpers
{
public static void ShouldEqualWithDiff(this string actualValue, string expectedValue)
{
ShouldEqualWithDiff(actualValue, expectedValue, DiffStyle.Full, Console.Out);
}
public static void ShouldEqualWithDiff(this string actualValue, string expectedValue, DiffStyle diffStyle)
{
ShouldEqualWithDiff(actualValue, expectedValue, diffStyle, Console.Out);
@welbornprod
welbornprod / Embedded Python in BASH
Created August 14, 2014 23:22
A little trick to embed python code in a BASH script.
#!/bin/bash
# Here are some embedded Python examples using Python3.
# They are put into functions for separation and clarity.
# Simple usage, only using python to print the date.
# This is not really a good example, because the `date`
# command works just as well.
function date_time {