Skip to content

Instantly share code, notes, and snippets.

View yomguy's full-sized avatar

Guillaume Pellerin yomguy

View GitHub Profile
@yomguy
yomguy / nv-linux.h_rt.patch
Last active December 30, 2018 17:40
Nvidia driver 390.87 patches needed for Linux RT kernel and related to the install method described here http://linuxaudioproduction.blogspot.com/2015/09/how-to-patching-and-compiling-nvidia.html
--- nv-linux.h.bak 2018-12-30 11:31:22.677374865 +0100
+++ nv-linux.h 2018-12-30 11:35:16.447873828 +0100
@@ -43,6 +43,8 @@
#include <linux/version.h>
#include <linux/utsname.h>
+#define CONFIG_PREEMPT_RT_FULL 1
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 9)
#error "This driver does not support kernels older than 2.6.9!"
@yomguy
yomguy / instafeed_tags.py
Last active November 22, 2017 15:34
Instafeed like django tag displaying an instagram gallery by hashtag (as a workaround since official API change in june 2016)
from django import template
import requests, json
register = template.Library()
@register.simple_tag
def instafeed(hashtag, count):
"""Simply use with autoescapeoff, for example: {% autoescape off %}{% instafeed 'manifeste16' 8 %}{% endautoescape %}"""
html = ''
@yomguy
yomguy / gist:8520156
Created January 20, 2014 13:50
Telemeta bug with TimeSide 0.5.3
Environment:
Request Method: GET
Request URL: http://localhost:9000/archives/items/zefezfezfzfzefezf_4/
Django Version: 1.4.5
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
@yomguy
yomguy / gist:6863561
Created October 7, 2013 06:58
TD 0.5dev fresh install + tests
root@ns224730:~/TimeSide# python tests/run_all_tests
downloading: guitar.wav
downloading: sweep.wav
downloading: sweep_mono.wav
downloading: sweep_32000.wav
downloading: sweep.flac
downloading: sweep.ogg
downloading: sweep.mp3
downloading: sweep_source.wav
@yomguy
yomguy / gist:6761064
Created September 30, 2013 08:54
TS 0.5dev tests
momo@wm22:~/dev/timeside/timeside$ python tests/run_all_tests
[TestTranscodingFrom32kHzWav]
Test conversion to mp3 ... ok
Test conversion to ogg ... ok
Test conversion to wav ... ok
[TestTranscodingFromAnotherWav]
Test conversion to mp3 ... ok
Test conversion to ogg ... ok
@yomguy
yomguy / gist:6725655
Created September 27, 2013 08:29
python-timeside 0.4.3 first tests
root@ns224730:~/timeside# python tests/alltests.py
[TestAnalyzing]
Test mean DC shift ... ERROR
Test max level ... ERROR
Test mean level ... ERROR
[TestComponentArchitecture]
Test abstract implementation ... ok
Test that a component doesn't implement the interface implemented by its parent ... ok
@yomguy
yomguy / gist:6725610
Created September 27, 2013 08:23
python-timeside 0.4.3 install on a fresh Wheezy debootstrap (sudo debootstrap --arch amd64 wheezy wheezy http://mirror.ovh.net/debian/)
root@ns224730:/# apt-get install python-timeside
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
file gir1.2-glib-2.0 iso-codes libaubio4 libblas3 libclass-isa-perl libexpat1 libffi5 libflac8 libfreetype6 libgfortran3 libgirepository-1.0-1 libglib2.0-0 libglib2.0-data
libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 libjpeg8 liblapack3 liblcms1 libmagic1 libogg0 liborc-0.4-0 libpcre3 libquadmath0 libsamplerate0 libsndfile1 libswitch-perl
libvorbis0a libvorbisenc2 libxml2 libyaafe0 mime-support perl perl-modules python python-aubio python-gi python-gobject python-gobject-2 python-gst0.10 python-imaging
python-libxml2 python-minimal python-mutagen python-numpy python-pkg-resources python-support python-yaafe python2.7 python2.7-minimal sgml-base shared-mime-info xml-core
Suggested packages:
import json
import requests
from requests_oauthlib import OAuth1
consumer_key='key'
consumer_secret='secret'
access_token_key='t_key'
access_token_secret='t_secret'
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr" >
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
@yomguy
yomguy / gist:5875132
Last active December 19, 2015 01:19
Illegal sniffing proxy through SFR 3G network : the result
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head><meta http-equiv="Content-type" content="text/html;charset=UTF-8" /><script src="http://1.2.3.4/bmi-int-js/bmi.js?version=1346927152" language="javascript"></script><title>Item : POUR LA DANSE KETJAK - Sound archives of the CNRS and the Musee de l'Homme. Research Centre of Ethnomusicology (CREM), University of Paris 10 - Telemeta</title> <style type="text/css" style="display:none">body{margin:0;padding:0;}a{text-decoration:none;color:#969696;}a img{border:none;}html,input,select,textarea,h1,h2,h3,h4,h5,h6{font-size:100%;}body{font:0.8125em/1em Verdana,sans-serif;line-height:1.3em;color:#333;background:#FFF;margin:0em;}/**/a,a:visited{color:#BB0000;text-decoration:none;}a:hover{background-color:transparent;color:#BB0000;text-decoration:underline;}a img{border:none;}.rst-content h1{font-size:1.2em;font-weight:bold;color:#353535;}.nett{clear:both;height:5px;}.wazing{clear:both;position:relative;}/**/#layout{min-width:740px;}#