Skip to content

Instantly share code, notes, and snippets.


Perceval Faramaz perfaram

Block or report user

Report or block perfaram

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# Install autoconf, automake and libtool smoothly on Mac OS X.
# Newer versions of these libraries are available and may work better on OS X
# This script is originally from
export build=~/devtools # or wherever you'd like to build
perfaram / (SMC)stringRepFromVal.m
Last active Aug 29, 2015
Gets the string representation for a given SMCVal_t struct (as NSString).
View (SMC)stringRepFromVal.m
* Gets the string representation for a given SMCVal_t struct (as NSString).
-(BOOL) stringRepresentationFromVal:(SMCVal_t)val toString:(NSString**)abri
if (val.dataSize > 0) {
if ((strcmp(val.dataType, DATATYPE_UINT8) == 0) ||
(strcmp(val.dataType, DATATYPE_UINT16) == 0) ||
(strcmp(val.dataType, DATATYPE_UINT32) == 0))
*abri = [[NSString alloc] initWithFormat:@"%u", (unsigned int)[self _strtoul:(char *)val.bytes forSize:val.dataSize inBase:10]];
perfaram / Serial_input.au3
Last active Aug 29, 2015
(AutoIT) Creating licence key input box
View Serial_input.au3
#include <GUIConstantsEx.au3>
Global $gui = GUICreate("...",600)
Global $Input = GUICtrlCreateInput("", 8, 150, 584, 35)
Global $LastInput = ""
Local $Temp, $LenPart = 5
perfaram / Siriproxy_iTunes_play_track.rb
Last active Dec 24, 2015
Function which listen for a Siri command, catch the name of the track, then play it in iTunes.Part of a Siriproxy Plugin. French speaking required.
View Siriproxy_iTunes_play_track.rb
listen_for /Mac play (.*)/i do |play|
#Only for french speaking !!!
replacements = [ ["My", "Me"], ["col", "Call"], ["radiant", "Radian"] ]
replacements.each {|replacement| play.gsub!(replacement[0], replacement[1])}
#Only for french speaking !!! [End]
itunescheck = system("osascript -e 'if application \"iTunes\" is running then return 1'");
if play==nil then
say "Viva la musica !", spoken: "Vivaa la mousiica !"
You can’t perform that action at this time.