Skip to content

Instantly share code, notes, and snippets.

Arthur Embleton aembleton

Block or report user

Report or block aembleton

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pylover
pylover / a2dp.py
Last active Nov 7, 2019
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
View a2dp.py
#! /usr/bin/env python3.5
"""
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04 and also debian jessie, with bluez5.
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 .
@sachin-handiekar
sachin-handiekar / QuartzRoute.java
Created Nov 5, 2014
A simple scheduler using camel-quartz
View QuartzRoute.java
package com.sachinhandiekar.examples;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
/**
* @author Sachin Handiekar
*/
public class QuartzRoute extends RouteBuilder {
View import_json_appsscript.js
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@honza
honza / description.md
Last active Apr 11, 2019
Ranking algorithm - Lower bound of Wilson score confidence interval for a Bernoulli parameter All implementations use 95% probability.
View description.md

Ranking algorithm

Lower bound of Wilson score confidence interval for a Bernoulli parameter

All implementations use 95% probability.

pos is the number of positive votes, n is the total number of votes.

Source

@jabley
jabley / oracle2mysql.sed
Created Jul 12, 2012
Help convert Oracle DDL to MySQL
View oracle2mysql.sed
s/NUMBER(22,0)/BIGINT/
s/NUMBER(9,0)/INT/
s/NUMBER(8,0)/INT/
s/NUMBER(6,0)/MEDIUMINT/
s/NUMBER(5,0)/SMALLINT/
s/NUMBER(3,0)/TINYINT/
s/NUMBER(2,0)/TINYINT/
s/NUMBER(1,0)/BIT/
s/NUMBER(16,2)/DECIMAL(16,2)/
s/NUMBER(11,2)/DECIMAL(11,2)/
@jch
jch / rabbitmq-install-osx.md
Created Apr 28, 2012
Troubleshooting RabbitMQ installation on OSX via homebrew
View rabbitmq-install-osx.md

Troubleshooting RabbitMQ installation on OSX via homebrew

brew update
brew install rabbitmq

To see if rabbitmq is running after following the installation instructions:

launchctl list | grep rabbit
> 48303	-	homebrew.mxcl.rabbitmq
@aembleton
aembleton / StringUtil.java
Created May 19, 2011
Useful String utility methods.
View StringUtil.java
package utils;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
View gist:527683
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
You can’t perform that action at this time.