Skip to content

Instantly share code, notes, and snippets.

@aniline
aniline / owon_wave.py
Last active October 14, 2023 11:28
Make a wave file from owon oscilloscope wave dump. It just does one channel. Not tested with numerous other combinations.
#!/usr/bin/env python
#
# Makes a wav file out of owon oscilloscope waveform save file.
# Tested with SDS6062 only.
#
# Used:
# http://bikealive.nl/owon-bin-file-format.html and
# http://bikealive.nl/tl_files/EmbeddedSystems/Test_Measurement/owon/OWON%20Oscilloscope%20PC%20Guidance%20Manual.pdf
#
@aniline
aniline / ledtiny85.c
Created February 13, 2015 17:29
Some Datasheet fu - (hw) hello world using timer in attiny.
#include <avr/interrupt.h>
#include <avr/io.h>
#include <util/atomic.h>
#define F_CPU 8000000
#include <util/delay.h>
volatile uint8_t ctr = 0;
volatile uint16_t ms = 0;
@aniline
aniline / lyahdark.user.js
Created September 6, 2014 14:51
lyahdark.user.js
var bgw = document.getElementsByClassName("bgwrapper")[0];
var fixed_spans = document.getElementsByClassName('fixed');
var hint_boxen = document.getElementsByClassName('hintbox');
bgw.style.backgroundColor = '#000';
bgw.style.color = 'white';
for (i in fixed_spans) {
var fs = fixed_spans[i];
if (fs.style != undefined) fs.style.backgroundColor = '#222';
@aniline
aniline / pidgin_theme.patch
Created April 16, 2014 06:37
Tried getting An IRC like theme from Adium to the pidgin (3)
diff -ru a/pidgin/themes/Contents/Resources/Content.html b/pidgin/themes/Contents/Resources/Content.html
--- a/pidgin/themes/Contents/Resources/Content.html 2014-04-15 12:32:45.000000000 +0530
+++ b/pidgin/themes/Contents/Resources/Content.html 2014-04-15 18:22:07.000000000 +0530
@@ -1,6 +1,4 @@
<div class="x-container %messageClasses% %messageDirection%">
- <abbr class="x-time" title="%time{yyyy-MM-ddTHH:mm:ssZZ}%">(%time%)</abbr>
- <span class="x-sender">%sender%:</span>
- <span class="x-message">%message%</span>
+<div class="x-sender">%sender%:</div><div class="x-message">%message%</div><div class="x-time" title="%time{yyyy-MM-ddTHH:mm:ssZZ}%">%time%</div>
</div>
._
__)
.. _.--...( o)
[.--._.",---. `:'
( (o) \._./ , :
`-: ._____,-/ :
`: `\ |_/ /
`. `' :
`. /
: :
@aniline
aniline / owa_link_unwrap.user.js
Last active December 28, 2015 11:59
Re-map links to actual target instead of through OWA servers.
diff --git a/rvp.c b/rvp.c
index 5d7cddc..caf4ba9 100644
--- a/rvp.c
+++ b/rvp.c
@@ -4684,9 +4684,20 @@ static rvp_st_ret rvp_send_typing( GaimConnection *gc, const char *who,
/*
* send an instant message
*/
-static int rvp_send_im( GaimConnection *gc, const char *who,
- const char *message, GaimMessageFlags flags ) {