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
perfaram / k3_keys.html
Created Oct 15, 2017
A backup of's SMC key informations and structs declarations.
View k3_keys.html
<center><h1>SMC Keys</h1></center>
<center><h2>K3 Version: 1.30f1
<table cellpadding="2" cellspacing="2" border="1" width="100%">
<th align=middle>KEY</th>
<th align=middle>TYPE</th>
View SMCTypes.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
View SCMDescriptions.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>Total key count</string>
<string>Returns 3 bit value, where each bit represents one of the three lock bit regions.</string>
<string>ALS variables overriding</string>
View SMCKeys.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<key>I* (upper-case i, not lower-case L)</key>
<string>Intensity (current)</string>
perfaram /
Last active Jul 19, 2017
Encoding ASCII text as DNA (quaternary base)
def to_base(n, bse):
digs = "0123456789abcdefghijklmnopqrstuvwxyz"
tmp = []
while n:
n, i = divmod(n, bse)
return "".join(tmp[::-1])
def chng_frm_base(s, frm_bse, to_bse):
if to_bse < 2 or to_bse > 36 or frm_bse < 2 or frm_bse > 36:
View Swift - Dijkstra.swift
import UIKit
public class Vertex {
var key: String?
var neighbors: Array<Edge>
init() {
self.neighbors = Array<Edge>()
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 !"
# 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 /
Created Nov 21, 2015 — forked from tarcieri/
Ed25519-based semi-private keys

Semiprivate Keys

Semi-private keys are an expansion of the traditional idea of asymmetric keys, which have a public/private keypair, to N keys which can each represent a different capability level. In the degenerate case, a semi-private key system has 3 different types of keys. These are, to use the Tahoe terminology:

  • writecap: can publish new ciphertexts
  • readcap: can read/authenticate ciphertexts
View gist:ca3521ea832c69673bea
// Eric Wolfe: Added support for checking if mobile radios are enabled on the device
// Original source:
#import <Foundation/Foundation.h>
#import <ifaddrs.h>
#import <net/if.h>
#import <SystemConfiguration/CaptiveNetwork.h>
@interface ERWNetworkStatus : NSObject
You can’t perform that action at this time.