Skip to content

Instantly share code, notes, and snippets.

View carandraug's full-sized avatar

David Miguel Susano Pinto carandraug

View GitHub Profile
@carandraug
carandraug / test.c
Created May 22, 2019 15:42
RedPitaya set global timer counter
// build with:
// gcc -Wall -g -O2 -c test.c -o test.o
// gcc -Wall -g -O2 -o test test.o
#include <stdint.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
@carandraug
carandraug / Foo.java
Last active September 4, 2017 14:03
test-javadoc-offlinelinks
package Foo;
public class Foo
{
public static void say (String what)
{
System.out.println (what);
return;
}
}
#include <stdio.h>
#include <asdkWrapper.h>
#include <Windows.h>
// cl /I "C:\Programs Files\Alpao\SDK\Include" /c dm-test.c
// cl dm-test.obj "C:\Program Files\Alpao\SDK\Lib\x86\ASDK.lib"
// dm-test.exe
int
@carandraug
carandraug / Stigs-Facebook-Homefeed-Cleanr.user.js
Created September 27, 2016 10:28 — forked from StigNygaard/Stigs-Facebook-Homefeed-Cleanr.user.js
Cleaning up the homefeed on Facebook. Removes Suggested Posts and Sponsored content from the homefeed.
// ==UserScript==
// @name Stig's Facebook Homefeed Cleanr
// @namespace dk.rockland.userscript.facebook.cleanr
// @description Cleaning up the homefeed on Facebook. Removes Suggested Posts and Sponsored content from the homefeed.
// @match *://*.facebook.com/*
// @version 2016.09.07.1
// @author Stig Nygaard, http://www.rockland.dk
// @homepageURL http://www.rockland.dk/userscript/facebook/cleanr/
// @supportURL http://www.rockland.dk/userscript/facebook/cleanr/
// @grant GM_getValue
@carandraug
carandraug / shapedbtn5.py
Last active June 15, 2016 18:28
Ilan's favour - quick example of sizer
# shapedBtnDemo.py Ilan Davis June 2016, based on tutorial on the web.
# Icons made on iDraw (Graphic.app) on mac (in VSG format), saves as .png approx. 10%, 100pixes high.
########################################################################
import wx
from wx.lib.agw.shapedbutton import SButton, SBitmapButton
from wx.lib.agw.shapedbutton import SBitmapToggleButton, SBitmapTextToggleButton
class MyForm(wx.Frame):
#----------------------------------------------------------------------
def __init__(self):
@carandraug
carandraug / matplotlib_sliders.py
Last active February 11, 2023 11:25
simple PyQt example with sliders to control drawing of matplotlib figure
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
## namespace organization changed in PyQt5 but the class name was kept.
## importing this way makes it easier to change to PyQt5 later
from PyQt4.QtGui import (QMainWindow, QApplication, QDockWidget, QWidget,
QGridLayout, QSlider)
from PyQt4.QtCore import Qt