Skip to content

Instantly share code, notes, and snippets.

View leite's full-sized avatar
🎉
it is happening

Francisco Leite leite

🎉
it is happening
View GitHub Profile
@takeseem
takeseem / a2dp
Last active October 26, 2022 00:34
Fixing bluetooth headset problem in xubuntu 16.04.
#!/bin/bash
# headset mac
mac="00:1D:DF:67:0A:29"
profile="a2dp"
# Special Bluetooth controller
btMac=""
# connect|disconnect wait time
waitTime=5
macId="${mac//:/_}"
@jesstelford
jesstelford / netflix-rpi.md
Last active April 4, 2020 17:52
Netflix on Raspberry Pi (incomplete)

Note: as @clibois mentioned below, due to the DRM Netflix uses, all decoding has to be done in CPU, making it somewhat choppy.

Note 2: Even the RPi 3 suffers from these CPU limitations. There is the potentially risky option of overclocking your RPi 3, but I haven't tried this.

If you manage to get smooth playback, please contact me, or post your solution here

UPDATE: I can no longer get this method to work. I have tried using Chromium v47, and v48, and both result in Netflix error "Oops, something went wrong" / C7053-1807, for which I can find no description online. If you manage to get things up and running, please contact me!

OSMC

@grafikchaos
grafikchaos / Category_Attributes.sql
Last active June 18, 2019 09:43 — forked from ticean/Category.sql
Magento EAV SQL Queries
SET @entityid = 5; -- category's ID
-- Select varchar/string based category attribute values
SELECT ea.attribute_id, ea.attribute_code, eav.value AS 'value', 'varchar' AS 'type'
FROM catalog_category_entity e
JOIN catalog_category_entity_varchar eav ON e.entity_id = eav.entity_id
JOIN eav_attribute ea ON eav.attribute_id = ea.attribute_id
WHERE e.entity_id = @entityid
-- Select integer based category attribute values (includes boolean values)
UNION(
@ademar111190
ademar111190 / alah
Created October 22, 2014 16:32
Show one of ninety nine allah`s names
#!/usr/local/bin/lua
Alah = {}
Alah.__index = Alah
function Alah:new(latin, arabic, portuguese)
o = {}
setmetatable(o, self)
self.__index = self
self.latin = latin
@basilfx
basilfx / tmux-notify.pl
Last active November 29, 2021 11:01
Irssi and tmux-notify
use strict;
use warnings;
use vars qw($VERSION %IRSSI);
use Irssi;
# Script info
$VERSION = '0.1';
%IRSSI = (
authors => 'Bas Stottelaar',
@mniip
mniip / tracer.c
Last active August 31, 2016 18:23
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <signal.h>
#include <limits.h>
#include <errno.h>
#include <pthread.h>
@ademar111190
ademar111190 / extractIcon.sh
Created February 22, 2014 04:56
extract zips files from android ui utils
#!/bin/bash
# extract zips files from android ui utils:
# http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html
# this is a GPL 3+ script
# author Ademar Alves de Oliveira <ademar111190@gmail.com>
# how to use:
# extractIcon.sh file_with_icons.zip destination/folder
@akhoury
akhoury / handlebars-helper-x.js
Last active February 17, 2024 13:25
Handlebars random JavaScript expression execution, with an IF helper with whatever logical operands and whatever arguments, and few more goodies.
// for detailed comments and demo, see my SO answer here http://stackoverflow.com/questions/8853396/logical-operator-in-a-handlebars-js-if-conditional/21915381#21915381
/* a helper to execute an IF statement with any expression
USAGE:
-- Yes you NEED to properly escape the string literals, or just alternate single and double quotes
-- to access any global function or property you should use window.functionName() instead of just functionName()
-- this example assumes you passed this context to your handlebars template( {name: 'Sam', age: '20' } ), notice age is a string, just for so I can demo parseInt later
<p>
{{#xif " name == 'Sam' && age === '12' " }}
BOOM
@pkuczynski
pkuczynski / parse_yaml.sh
Last active July 9, 2024 04:42
Read YAML file from Bash script
#!/bin/sh
parse_yaml() {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
awk -F$fs '{
indent = length($1)/2;
vname[indent] = $2;
for (i in vname) {if (i > indent) {delete vname[i]}}
@ademar111190
ademar111190 / .gitignore
Last active January 3, 2016 15:49
A little algorithm using genetic concepts to find a secret word.
out/*