-
Creating a repo
-
Creating commits
-
Exploring the .git object store
- Commits (Anatomy of a commit)
using System.Text.RegularExpressions; | |
var robot = Require<Robot>(); | |
robot.Router.Get("/announce/{adapterId}/{room}", context => { | |
Announce(context); | |
}); | |
robot.Router.Post("/announce/{adapterId}/{room}", context => { | |
Announce(context); |
var robot = Require<Robot>(); | |
var iterations = Enumerable.Range(0,100000); | |
var random = new Random(); | |
Parallel.ForEach(iterations, i => { |
var robot = Require<Robot>(); | |
robot.Respond(@"show all the scores", msg => { | |
msg.Http("http://live.mobileapp.fifa.com/api/wc/matches").GetJson((err, res, body) => { | |
var groups = GetMatches(msg).Where(m => m["b_Started"].Value<bool>()).GroupBy(m => m["c_Phase_en"].ToString()); | |
if(!groups.Any()){ | |
return; |
<# | |
.SYNOPSIS | |
Clones an SVN repository usng git-svn, mapping users using Active Directory. | |
.DESCRIPTION | |
This function is a wrapper around git-svn that tries to resolve the names and email addresses of all users in the commit history | |
.Parameter SvnPath | |
The full path to the SVN repository |
import sublime, sublime_plugin, textwrap, unicodedata | |
# from http://stackoverflow.com/questions/22063366/show-info-about-current-character-in-status-bar-in-sublime-text-2 | |
class utfcodeCommand(sublime_plugin.EventListener): | |
def on_selection_modified(self, view): | |
# some test chars = $ € | |
sublime.status_message('Copying with pretty format') | |
selected = view.substr(view.sel()[0].a) | |
char = str(selected) |
function Send-UdpDatagram | |
{ | |
Param ([string] $EndPoint, | |
[int] $Port, | |
[string] $Message) | |
$IP = [System.Net.Dns]::GetHostAddresses($EndPoint) | |
$Address = [System.Net.IPAddress]::Parse($IP) | |
$EndPoints = New-Object System.Net.IPEndPoint($Address, $Port) | |
$Socket = New-Object System.Net.Sockets.UDPClient |
function Get-Collector([string] $collectorName, [PSCredential] $credential) { | |
$response = iwr "https://api.sumologic.com/api/v1/collectors" -Credential $credential | |
$content = ConvertFrom-Json $response.Content | |
$match = $content.collectors | Where {$_.name -eq $collectorName} | Select -First 1 | |
return $match | |
} | |
function Get-CollectorSources([string] $collectorName, [PSCredential] $credential) { | |
$collector = Get-Collector $collectorName $credential |
echo | openssl s_client -connect sub.domain.com:443 2>/dev/null -servername sub.domain.com| openssl x509 -dates -noout -subject |
I hereby claim:
To claim this, I am signing this object: