Skip to content

Instantly share code, notes, and snippets.

@joergschiller
joergschiller / a2dp_sink_ubuntu_linux.md
Created January 24, 2012 23:05
A2DP Sink on Ubuntu Linux with bluez (streaming bluetooth stereo audio from smartphone to pc)

Howto Enable and Use A2DP Sink on Ubuntu Linux with Bluez

  1. Add Enable=Source to /etc/bluetooth/audio.conf right after [General].

  2. Find address in form XX:XX:XX:XX:XX:XX of phone with hcitool scan.

  3. Pair and trust smartphone with sudo bluez-simple-agent hci0 XX:XX:XX:XX:XX:XX and sudo bluez-test-device trusted XX:XX:XX:XX:XX:XX yes.

  4. Create loopback in pulseaudio connection bluetooth a2dp source with alsa sink:

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 23, 2024 09:05
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active June 13, 2024 10:59
A badass list of frontend development resources I collected over time.
@gdetrez
gdetrez / powerline-test.sh
Last active May 25, 2024 22:34
Powerine font test
#!/bin/bash
echo -e "Powerline glyphs:\n\
Code points Glyphe Description Old code point
U+E0A0 \xee\x82\xa0 Version control branch (U+2B60 \xe2\xad\xa0 )\n\
U+E0A1 \xee\x82\xa1 LN (line) symbol (U+2B61 \xe2\xad\xa1 )\n\
U+E0A2 \xee\x82\xa2 Closed padlock (U+2B64 \xe2\xad\xa4 )\n\
U+E0B0 \xee\x82\xb0 Rightwards black arrowhead (U+2B80 \xe2\xae\x80 )\n\
U+E0B1 \xee\x82\xb1 Rightwards arrowhead (U+2B81 \xe2\xae\x81 )\n\
U+E0B2 \xee\x82\xb2 Leftwards black arrowhead (U+2B82 \xe2\xae\x82 )\n\
@XVilka
XVilka / TrueColour.md
Last active June 10, 2024 17:21
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@chrisblossom
chrisblossom / gist:8690833
Last active February 23, 2016 07:40
Dynamically set ansible ansible_ssh_port and ansible_ssh_user
---
# 1) Be sure to set the following variables for all hosts:
# vars:
# oldsshport: 22
# sshport: 555
# 2) Might fail without setting remote_tmp = /tmp/ansible/$USER in your ansible.cfg. Includes a fix for this setting below.
# 3) Once host is setup most of the checks are skipped and works very quickly.
# 4) Be sure to set non-standard shells in a different playbook later. Stick with /bin/bash until you can run apt install.
# 5) Assumes root user has sshkey setup already. Not sure how to utilize the --ask-pass option. For now, use ssh-copy-id prior to running playbook on new host for root user (if needed).
@weisi
weisi / privacy-design-pattern-unusual-activities.rst
Last active August 29, 2015 14:01
Privacy Design Pattern: Handling Unusual Account Activities

Privacy Design Pattern: Handling Unusual Account Activities

Author: Weisi Dai (weisi@cmu.edu)
Date: Apr 28, 2014

The Privacy Design Pattern

# Poker II Firmware disassembly help tool.
original = IO.read("./Poker II original firmware.bin")
extracted = ""
original.each_byte{|b|
m = (((b & 0x0f) << 4) | ((b & 0xf0) >> 4)) ^ 0xff
extracted << m.chr
}
puts extracted
@erikpena
erikpena / main.ino
Last active July 21, 2023 05:27
A simple hardware button debouncer using ESP8266 libraries within the Arduino IDE.
// pin is 2.
const int multiButton = 2;
void setup() {
// Configure the pin mode as an input.
pinMode(multiButton, INPUT);
// Attach an interrupt to the pin, assign the onChange function as a handler and trigger on changes (LOW or HIGH).
attachInterrupt(multiButton, onChange, CHANGE);