Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / GCPluginInstaller.wxs
Created Apr 12, 2012
Example code for creating multiple installer types
View GCPluginInstaller.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="GradeCam Plugin" Language="1033" Version="${FBSTRING_PLUGIN_VERSION}" Manufacturer="${FBSTRING_CompanyName}" UpgradeCode="b0000000-4cf5-51d8-9699-b470daed7c1e">
<Package InstallerVersion="200" Compressed="yes" Description="Installer for the GradeCam Plugin" InstallScope="perUser" />
<Upgrade Id="b0000000-4cf5-51d8-9699-b470daed7c1e">
<UpgradeVersion
Property="OLD_VERSION_FOUND"
Minimum="0.0.1" IncludeMinimum="yes"
Maximum="${FBSTRING_PLUGIN_VERSION}" IncludeMaximum="yes"
@icomefromthenet
icomefromthenet / Vagrantfile
Created Jul 10, 2012
Vagrant setup for cli php dev
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
@ovolve
ovolve / sumperms1234.ipynb
Last active May 17, 2016
Brute forcing a menacing maths problem
View sumperms1234.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@drodriguez
drodriguez / test.mm
Created Dec 22, 2010
Objective-C++ NSString wrapper example
View test.mm
// $ g++ -o test -framework Foundation -Wall test.mm
// $ ./test
// The string length is 12
// The string third char value is 108
// The string is Hello World!
#include <iostream>
#import <Foundation/Foundation.h>
class MyCppNSStringWrapper
@DamianMac
DamianMac / gist:cab420adb9f9a915b028
Created Oct 30, 2014
Create a release with Octopus Client API
View gist:cab420adb9f9a915b028
var server = "http://yourserveraddress:8065/"; //Your server and IP address
var apiKey = "API-XXXXXXXXXXXXXXXXXXXXXXXXX"; // Get this from your 'profile' page in the Octopus web portal
var endpoint = new OctopusServerEndpoint(server, apiKey);
var repository = new OctopusRepository(endpoint);
var projectId = "projects-225"; //your project id
//This pulls out the info you need, the same call that's made on the Create Release page in the UI
var template = repository.Client.Get<Octopus.Client.Model.ReleaseTemplateResource>("/api/deploymentprocesses/deploymentprocess-" + projectId + "/template");
@17twenty
17twenty / GoWithC.go
Last active Jul 11, 2016
Cross Compiling and Language Interop oh my!
View GoWithC.go
package main
import (
"./binding"
"fmt"
)
func main() {
binding.PrintHello()
binding.Seed(1)
fmt.Println(binding.Random())
@viking
viking / raphael-arrow.js
Created Jun 23, 2011
Raphael.js arrow function
View raphael-arrow.js
Raphael.fn.arrow = function(x1, y1, x2, y2, size) {
var angle = Raphael.angle(x1, y1, x2, y2);
var a45 = Raphael.rad(angle-45);
var a45m = Raphael.rad(angle+45);
var a135 = Raphael.rad(angle-135);
var a135m = Raphael.rad(angle+135);
var x1a = x1 + Math.cos(a135) * size;
var y1a = y1 + Math.sin(a135) * size;
var x1b = x1 + Math.cos(a135m) * size;
var y1b = y1 + Math.sin(a135m) * size;
@darktable
darktable / GUIScaler.cs
Created Mar 11, 2012
Unity3D: script to automatically scale gui elements on high dpi devices (like iPhone 4 or iPad 3rd Generation).
View GUIScaler.cs
using UnityEngine;
using System.Collections;
namespace UnityEngine {
/// <summary>
/// Usage:
///
/// (optional) Call GUIScaler.Initialize() in Start(), Awake() or OnEnable() (only needed once)
/// Call GUIScaler.Begin() at the top of your OnGUI() methods
/// Call GUIScaler.End() at the bottom of your OnGUI() methods
View resizer.sh
#!/bin/bash -e
# Make sure you have installed ImageMagick
# http://cactuslab.com/imagemagick/
# Ensure we're running in location of script.
cd "`dirname $0`"
for f in *; do
if [[ $f == *@3x* ]];
then
View nuget-dependency-visualizer.fsx
#r @"packages\Streams.0.2.5\lib\Streams.Core.dll"
open System
open System.IO
open System.Collections.Generic
open Nessos.Streams
// make Visual Studio use the script directory
Directory.SetCurrentDirectory(__SOURCE_DIRECTORY__)
You can’t perform that action at this time.