Skip to content

Instantly share code, notes, and snippets.

View ppanyukov's full-sized avatar

Philip Panyukov ppanyukov

  • UK
View GitHub Profile
@ppanyukov
ppanyukov / apple-wwdc14-video-hack.js
Last active August 29, 2015 14:06
Apple WWDC14 Video List hack
// A hacky script to work around that piece of crap WWDC14 page
// which does not have links to individual videos, not allows
// to have more than one video marked as active at the same time.
//
// Basically I went through the list of videos, picked those
// I think are relevant, make then "active", and then zap all
// the others.
//
// Simply copy/paste this into dev tools console.
//
@ppanyukov
ppanyukov / hadoop2
Created June 10, 2015 16:38
Make HDInsight Enumlator hadoop commands work with cygwin
#!/usr/bin/env bash
# A hack to make HDInsight Emulator work with cygwin bash.
# Basically, we don't use bash things which come with the installation.
# Instead, we call out to the Windows cmd scripts to invoke hadoop stuff.
cmd /c "hadoop" $*
@ppanyukov
ppanyukov / bad.txt
Created August 7, 2015 11:30
BenchmarkDotNet Logs
Bad commit? 66cce477d016979cde3203d5f7125710cffdf4a4
NOTE: formatted the numbers in the table to make more readable
--------------
Target competition: Math_DoubleSqrtAvx
// ***** Competition: Start *****
// Found benchmarks:
// Math_DoubleSqrtAvx_Sqrt13_Throughput_X64_RyuJit_NET-Current -w=5 -t=10
@ppanyukov
ppanyukov / p4x.sh
Created June 20, 2011 10:13
Support git-like aliases for Perforce p4
#!/bin/bash
#
# A kind of an alias support for the Perforce p4.
#
# This one aliases "interchanges" and "changes" commands to be printed out nicely in format:
#
# Change <change_no> on <date> by <user>@<workspace> [<status>]
# <first line of change description>
# --
# Change <change_no> on <date> by <user>@<workspace> [<status>]
@ppanyukov
ppanyukov / Prelude.cs
Created July 29, 2011 09:31 — forked from anonymous/Prelude.cs
Oh, you poor, poor imperative developers...
/* Prelude.cs : What happens when a haskell programmer learns C#.
Copyright (c) 2011 Clark Gaebel
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
@ppanyukov
ppanyukov / about.md
Created August 10, 2011 11:46 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@ppanyukov
ppanyukov / FooBar.cs
Created September 21, 2012 10:58
Cool way to create, embed, and structure tests
internal static class FooBar
{
private static void DoStuff()
{
}
private static class SelfTests
{
[TestFixture]
@ppanyukov
ppanyukov / blah.cs
Created June 18, 2013 16:52
foobar
using Foo.Bar
public class Blah
{
}
package main
import (
"fmt"
"log"
"net/http"
"os"
"strings"
"time"
Southpaw:~ philip$ export GOPATH="/Users/philip/scratch/gobook"; export PATH=${GOPATH}/bin:${PATH}
Southpaw:~ philip$ mkdir -p $GOPATH/src/hello
Southpaw:~ philip$ vi $GOPATH/src/hello/hello.go
// source:
package main
import (
"fmt"