Skip to content

Instantly share code, notes, and snippets.

View laurentkempe's full-sized avatar
🚀
❤✨

Laurent Kempé laurentkempe

🚀
❤✨
View GitHub Profile
[merge]
tool = p4merge
keepBackup = false;
[mergetool "p4merge"]
cmd = p4merge -nb \"(common ancestor)\" -nl \"(current branch)\" -nr \"(to be merged)\" \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
keepTemporaries = false
trustExitCode = false
keepBackup = false
@lukencode
lukencode / widget.js
Last active December 7, 2021 19:16
Starter template for creating jsonp embeddable widgets.
(function () {
var scriptName = "embed.js"; //name of this script, used to get reference to own tag
var jQuery; //noconflict reference to jquery
var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";
var jqueryVersion = "1.8.3";
var scriptTag; //reference to the html script tag
/******** Get reference to self (scriptTag) *********/
var allScripts = document.getElementsByTagName('script');
# Utility commands surrounding Hubot uptime.
spawn = require('child_process').spawn
module.exports = (robot) ->
robot.hear /hubot (who|where) are you\??/i, (msg) ->
msg.finish()
child = spawn('/bin/sh', ['-c', "echo I\\'m $LOGNAME@$(hostname):$(pwd) \\($(git rev-parse HEAD)\\)"])
child.stdout.on 'data', (data) ->
msg.send "#{data.toString().trim()} running node #{process.version} [version: #{robot.version}, pid: #{process.pid}, name: #{robot.name} ]"
@srkirkland
srkirkland / deploy.ps1
Created September 10, 2012 22:18
TeamCity CI Deploy Azure PowerShell Script
#Modified and simplified version of https://www.windowsazure.com/en-us/develop/net/common-tasks/continuous-delivery/
$subscription = "[Your Subscription Name]"
$service = "[Your Azure Service Name]"
$slot = "staging" #staging or production
$package = "[ProjectName]\bin\[BuildConfigName]\app.publish\[ProjectName].cspkg"
$configuration = "[ProjectName]\bin\[BuildConfigName]\app.publish\ServiceConfiguration.Cloud.cscfg"
$timeStampFormat = "g"
$deploymentLabel = "ContinuousDeploy to $service v%build.number%"
Write-Output "Running Azure Imports"
@adammw
adammw / README.md
Created August 3, 2012 06:30
Node.js for Raspberry Pi

Node.js for Raspberry Pi

Pre-built binaries

Recent releases have been pre-built using cross-compilers and this script and are downloadable below.

If you have found these packages useful, give me a shout out on twitter: @adammw

@lgrammel
lgrammel / index.html
Created May 23, 2012 00:43
D3.xml Example
<!DOCTYPE html>
<html>
<head>
<title>D3.xml Example</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script>
<style type="text/css">
.chart div {
font: 10px sans-serif;
background-color: steelblue;
text-align: right;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Text;
using ReactiveUI;
using RestSharp;
@insom
insom / listener.coffee
Created January 18, 2012 16:11
A Hubot HTTP -> talking script
module.exports = (robot) ->
robot.router.post "/hubot/say", (req, res) ->
room = req.body.room
message = req.body.message
robot.logger.info "Message '#{message}' received for room #{room}"
user = robot.userForId 'broadcast'
user.room = room
user.type = 'groupchat'
robot.send user, "#{message}"
res.writeHead 200, {'Content-Type': 'text/plain'}
@mabster
mabster / AutoTemplateSelector.cs
Created January 13, 2012 02:11
WPF Dynamic DataTemplates
using System;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
namespace WpfApplication8
@DazWorrall
DazWorrall / listener.coffee
Created December 18, 2011 17:39
A hubot http listening server
# Inspired by http://tomb.io/posts/hubot-ci-and-deploying/
# Its probably tightly bound to the xmpp adapter, and incorrect
# in loads of ways, but its a start.
# POST a json document to /message containing 'room' (the JID of the room
# you want to talk to) and 'message' (the message you want to send)
http = require "http"
Robot = require '../src/robot'