I hereby claim:
- I am pzurek on github.
- I am pzurek (https://keybase.io/pzurek) on keybase.
- I have a public key whose fingerprint is 1757 F1FF 0068 4C51 738C CB34 B4C3 0087 2944 31CD
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// This function exchanges the authorization code for a token and returns the parsed info | |
function getToken(myCode, myDomainPrefix) { | |
var tokenUrl = "https://" + myDomainPrefix + ".vendhq.com/api/1.0/token"; | |
var payload = { | |
"code": myCode, | |
"client_id": myVendClientId, | |
"client_secret": myVendClientSecret, | |
"grant_type": "authorization_code", | |
"redirect_uri": myVendRedirectUri |
#light | |
open System | |
open Cairo | |
open Gtk | |
Gtk.Application.Init() | |
let window = new Gtk.Window("F# Cairo") | |
let vBox = new Gtk.VBox() |
#light | |
open System | |
open Cairo | |
open Gtk | |
open Gdk | |
Gtk.Application.Init() | |
let window = new Gtk.Window("Fucull") |
(* | |
to compile use: | |
fsc FebKit.fs -r "/usr/lib/cli/webkit-sharp-1.0/webkit-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll" | |
*) | |
#light | |
open System | |
open WebKit | |
open Gtk |
public void Initialize() | |
{ | |
DocumentCollection dm = Application.DocumentManager; | |
dm.DocumentActivated += delegate(object s, DocumentCollectionEventArgs d){ | |
Document doc = d.Document; | |
doc.CommandWillStart += delegate(object sender, CommandEventArgs e){ | |
if ((e.GlobalCommandName == "PUBLISH") || | |
(e.GlobalCommandName == "EXPORT") || | |
(e.GlobalCommandName == "3DDWF")){ |
void updateReferencingSheet(Document doc) | |
{ | |
// Retrieve the built-in VIEW_DISCIPLINE parameter | |
Parameter discipline = selectedViewport | |
.get_Parameter(BuiltInParameter.VIEW_DISCIPLINE); | |
// Save the value of that parameter for later | |
int disciplineNo = discipline.AsInteger(); | |
Transaction transaction = new Transaction(doc); |
try | |
{ | |
if( null == commandData ) | |
{ | |
throw new ArgumentNullException( | |
"commandData" ); | |
} | |
UIApplication uiapp = commandData.Application; | |
Application app = uiapp.Application; |
try { | |
if (null == commandData) { | |
throw new ArgumentNullException("commandData"); | |
} | |
UIApplication app = commandData.Application; | |
UIDocument uiDoc = app.ActiveUIDocument; | |
Document doc = uiDoc.Document; | |
using (Transaction transaction = new Transaction(doc)) { |