-
Add
Enable=Source
to /etc/bluetooth/audio.conf right after[General]
. -
Find address in form XX:XX:XX:XX:XX:XX of phone with
hcitool scan
. -
Pair and trust smartphone with
sudo bluez-simple-agent hci0 XX:XX:XX:XX:XX:XX
andsudo bluez-test-device trusted XX:XX:XX:XX:XX:XX yes
. -
Create loopback in pulseaudio connection bluetooth a2dp source with alsa sink:
This file contains hidden or 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
# A few oneliners to backfill the logstash with logs from all the apache servers | |
# (there server is running in a screen session in my home directory on "django apache admin 1" aka: djaapaadm1) | |
# Try searching for error at http://djaapaadm1.ddtc.cmgdigital.com:9292/ | |
# backfill access logs to the listen on port 9293 | |
for n in {1..10}; do ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no djaapaprd$n.ddtc.cmgdigital.com 'tail -n 10000 /localfs/httpd/logs/*-access_log' | sed '/^$/d;/^==> /d'; done | pv | nc djaapaadm1.ddtc.cmgdigital.com 9293 | |
# backfill error logs to the listen on port 9294 | |
for n in {1..10}; do ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no djaapaprd$n.ddtc.cmgdigital.com 'tail -n 10000 /localfs/httpd/logs/*-error_log' | sed '/^$/d;/^==> /d'; done | pv | nc djaapaadm1.ddtc.cmgdigital.com 9294 |
This file contains hidden or 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
#!/bin/sh | |
# | |
# ******************************************* | |
# WARNING: this does *not* handle 3-way merges properly. | |
# Anything modified on the local branch since the common base will get ignored. | |
# | |
# FOR ANYONE LANDING HERE: | |
# This script is now updated as part of the git-whistles gem. | |
# https://github.com/mezis/git-whistles | |
# ******************************************* |
This file contains hidden or 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
<?php | |
// source: http://cubiq.org/the-perfect-php-clean-url-generator | |
// author: Matteo Spinelli | |
// MIT License / http://creativecommons.org/licenses/by-sa/3.0/ (please re-check at source) | |
setlocale(LC_ALL, 'en_US.UTF8'); | |
function toAscii($str, $replace=array(), $delimiter='-') { | |
if( !empty($replace) ) { | |
$str = str_replace((array)$replace, ' ', $str); | |
} |
This file contains hidden or 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
gem 'concurrent' |
This file contains hidden or 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
@mixin sprite-background($name, $folder, $sprite-width) { | |
$sprites: sprite-map("#{$folder}/*.png"); | |
$sprites-retina: sprite-map("#{$folder}@2x/*.png"); | |
background-image: sprite-url($sprites); | |
background-position: sprite-position($sprites, $name); | |
background-repeat: no-repeat; | |
display: inline-block; | |
height: image-height(sprite-file($sprites, $name)); | |
width: image-width(sprite-file($sprites, $name)); |
This file contains hidden or 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 sh | |
# Download lists, unpack and filter, write to stdout | |
curl -s https://www.iblocklist.com/lists.php \ | |
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| xargs wget -O - \ | |
| gunzip \ | |
| egrep -v '^#' |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
This file contains hidden or 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
#a/usr/bin/perl | |
# This script was hastily cobbled together for my own use. It can | |
# probably break your system. Use at your own risk. | |
$JAIL = "/srv/http"; | |
$USER = "http"; | |
$GROUP = "http"; | |
$WWW_DIR = "www"; | |
sub run{ |
This file contains hidden or 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
#!/bin/sh | |
# | |
PING="/sbin/ping" | |
PACKET_SIZE=64 | |
PACKET_COUNT=10 | |
PING_INTERVAL=1 | |
TIMEOUT=2 | |
BASE_COST=200 |
OlderNewer