Skip to content

Instantly share code, notes, and snippets.

View kidig's full-sized avatar
🎯

DmitrII Gerasimenko kidig

🎯
  • Toronto, Canada
View GitHub Profile
@pylover
pylover / a2dp.py
Last active March 11, 2024 03:06
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3
"""Fixing bluetooth stereo headphone/headset problem in debian distros.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
Licence: Freeware
@ricardo-rossi
ricardo-rossi / ElasticSearch.sh
Last active December 1, 2023 04:55
Installing ElasticSearch on Ubuntu 14.04
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
@alexanderjulo
alexanderjulo / languages-and-countries.py
Last active March 17, 2024 15:43
Python Tuple Lists with language codes (as of ISO 639-1) and country codes (as of ISO 3166)
# coding: utf8
languages = [
('aa', 'Afar'),
('ab', 'Abkhazian'),
('af', 'Afrikaans'),
('ak', 'Akan'),
('sq', 'Albanian'),
('am', 'Amharic'),
('ar', 'Arabic'),
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 1, 2024 03:34
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@taudep
taudep / test_flask.py
Created January 26, 2012 22:42
Sample Flask Python server
from flask import Flask, g, request, flash, url_for, redirect, render_template, abort
from flaskext.jsonify import jsonify
from flaskext.sqlalchemy import *
from sqlalchemy import *
from pyodbc import *
import logging
DATABASE = "dsn=Foo;Trusted_Connection=Yes"
SECRET_KEY = "asdasdfasd1234sdagfa23asdfg123"