Skip to content

Instantly share code, notes, and snippets.

View ticapix's full-sized avatar

Pierre Gronlier ticapix

View GitHub Profile
@ticapix
ticapix / blync.ino
Last active August 29, 2015 14:00
Arduino code for the Blync (http://gronlier.fr/blog/2014/03/blync-2/)
#define RPIN 6
#define GPIN 5
#define BPIN 3
#define CMD_SIZE 4
#define CMD_AUTO 0
#define CMD_GET 1
#define CMD_SET 2
#define CMD_ACK 1
@ticapix
ticapix / pulseview.sh
Last active August 29, 2015 14:07
pulseview local installation script
#!/bin/sh
echo cd `dirname $0`
sudo aptitude install automake git build-essential libtool pkg-config \
libglib2.0-dev libglibmm-2.4-dev libzip-dev libusb-1.0-0-dev libftdi-dev \
python3-dev cmake libqt4-dev libboost-filesystem-dev libboost-system-dev
# check doxygen python-dev python-gi-dev python-setuptools swig default-jdk
@ticapix
ticapix / UsbDevice.cpp
Last active August 29, 2015 14:07
Windows user-space Blync control program
// UsbDevice.cpp : Defines the entry point for the console application.
//
// http://msdn.microsoft.com/en-us/library/windows/hardware/ff540174(v=vs.85).aspx USB c++
// http://www.osronline.com/article.cfm?article=532
#include "stdafx.h"
#include <Windows.h>
#include <SetupAPI.h>
@ticapix
ticapix / mybashrc
Created October 20, 2014 12:23
cygwin survival profile script
echo "Adding MSBuild to the path"
PATH="`cygpath.exe "C:\Program Files (x86)\MSBuild\12.0\bin\"`:$PATH"
PATH="`cygpath.exe "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC"`:$PATH"
echo "Setting source-highligthing"
export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
export LESS=' -R '
echo "Adding npp aka Notepad++ alias"
function npp() {
@ticapix
ticapix / doc_CMakeLists.txt
Last active August 29, 2015 14:07
Doxygen with Cmake
find_package(Doxygen)
if(DOXYGEN_FOUND)
set(SOURCE_DIRECTORIES
${CMAKE_SOURCE_DIR}/src/
# to complete if needed
)
# convert every directory to relative path because doxygen from cygwin env is
# prefixing the paths by a cygwin path ending in /cygwin/c/.../C:/.../Foundation
#include <TimerOne.h>
const uint8_t SYMBOLS[] =
{
0xC0, // 0
0xF9, // 1
0xA4, // 2
0xB0, // 3
0x99, // 4
0x92, // 5
const uint8_t SYMBOLS[17] =
{
0xC0, // 0
0xF9, // 1
0xA4, // 2
0xB0, // 3
0x99, // 4
0x92, // 5
0x82, // 6
0xF8, // 7
@ticapix
ticapix / Find-String.ps1
Last active November 26, 2015 07:13
grep in powershell
# ORIGIN http://weblogs.asp.net/whaggard/powershell-script-to-find-strings-and-highlight-them-in-the-output
# Find-String.ps1
# Wrapper around dir | select-string which will highlight the pattern in the results
param ( [string] $pattern = ""
, [string] $filter = "*.*"
, [switch] $recurse = $false
, [switch] $caseSensitive = $false)
if ($pattern -eq $null -or $pattern -eq "") { Write-Error "Please provide a search pattern!" ; return }
// ==UserScript==
// @name AutoAnswer
// @namespace skype.com
// @include https://*web*.skype.com/*
// @version 1
// @grant none
// ==/UserScript==
var authorized_contacts = [
'Skype name'
];
pact install python-setuptools python3-setuptools
easy_install-2.7 pip
easy_install-3.4 pip