Skip to content

Instantly share code, notes, and snippets.

View aesedepece's full-sized avatar
🦾
Building!

Adán SDPC // asdpc.eth aesedepece

🦾
Building!
View GitHub Profile
@digitarald
digitarald / 1-moz-mobile-connection-snippet.js
Last active December 18, 2015 03:19
Detect carrier and region from `mozMobileConnection`'s `MNC` and `MCC`
// Original https://github.com/mozilla/fireplace/blob/c50b5ca51643f13ae2e8b3a003d3aa0432358bf7/hearth/media/js/user.js#L41
// Retrieve MCC and MNC from mozMobileConnection (requires "privileged" app type and "mobileconnection" permission)
// and translates them to carrier and region via mobilenetwork.js
try {
// When Fireplace is served as a privileged packaged app (and not
// served via Yulelog) our JS will have direct access to this API.
var conn = navigator.mozMobileConnection;
if (conn) {
@chrisjlee
chrisjlee / Atheros-AR8161-install.sh
Created August 20, 2012 18:14
How do I install drivers for the Atheros AR8161 Ethernet controller?
#!/bin/bash
# From: http://askubuntu.com/questions/165192/how-do-i-install-drivers-for-the-atheros-ar8161-ethernet-controller
echo 'Rebuilding drivers for Atheros ar8161 Ethernet Controller...'
echo 'Internet required for this to work'
cd ~
sudo apt-get install build-essential linux-headers-generic linux-headers-`uname -r`
wget -O- http://linuxwireless.org/download/compat-wireless-2.6/compat-wireless-2012-07-03-pc.tar.bz2 | tar -xj
cd compat-wireless-2012-07-03-pc
./scripts/driver-select alx
@tobitailor
tobitailor / get_barcode_from_image.js
Created June 1, 2010 19:33
Barcode recognition with JavaScript - Demo: http://bit.ly/djvUoy
/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',