Skip to content

Instantly share code, notes, and snippets.

import os
import boto.utils
import boto3
import requests
import datetime
import time
def get_contents(filename):
@pylover
pylover / a2dp.py
Last active August 11, 2024 06:11
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
@moehlone
moehlone / make_writable.js
Created March 17, 2016 08:27
Make JavaScript readonly propertys writable (example for overwriting navigator.userAgent; useful for unit tests -> browser detection)
/**
* Creates a read/writable property which returns a function set for write/set (assignment)
* and read/get access on a variable
*
* @param {Any} value initial value of the property
*/
function createProperty(value) {
var _value = value;
/**
@mbejda
mbejda / professions.txt
Last active February 4, 2023 15:08
Compiled list of professions.
Profession
Professors
Teachers
Actors
Clergy
Musicians
Philosophers
Visual Artists
Writers
Audiologists
@mbejda
mbejda / Industries.csv
Last active September 4, 2024 05:08
Compiled list of industries.
Industry
Accounting
Airlines/Aviation
Alternative Dispute Resolution
Alternative Medicine
Animation
Apparel/Fashion
Architecture/Planning
Arts/Crafts
Automotive
@didasy
didasy / gpu.js
Created July 4, 2015 13:17
Finding GPU Info via JS
var canvas = $('<canvas />', { width: '1', height: '1' }).appendTo('body');
var webglVersion = window.location.search.indexOf('v=2') > 0 ? 2 : 1;
var gl;
var possibleNames = (webglVersion === 2) ? ['webgl2', 'experimental-webgl2'] : ['webgl', 'experimental-webgl'];
var contextName;
possibleNames.forEach(function (name) {
gl = canvas[0].getContext(name, { stencil : true });
contextName = !!gl;
});