Skip to content

Instantly share code, notes, and snippets.

@staltz
staltz / introrx.md
Last active August 6, 2026 06:30
The introduction to Reactive Programming you've been missing
@umair-me
umair-me / new_gist_file
Created October 23, 2013 22:16
Migrate or Clone tfvc tfs to git using git-tfs
http://gitstack.com/how-to-migrate-from-tfs-to-git/
http://stackoverflow.com/questions/19548659/migrate-from-tfs-to-git-on-visualstudio-com/19550144
git-tfs clone --username=mumair85 --password=xxxx https://mumair85.visualstudio.com/DefaultCollection $/uGen
After that clone the new repository or Push an existing repository
From Visual Studio
You can Push a repository after connecting with Team Explorer and adding the Git repo to your list of Local Git Repositories.
@mgedmin
mgedmin / StartSSL.md
Last active October 22, 2023 07:52
Free StartSSL.com SSL certificate HOWTO

How to get a free StartSSL.com SSL certificate

I'm writing this up from memory, so errors may appear.

This has been updated to use SHA256 certificates.

Start

  1. Go to http://www.startssl.com/
  2. Click on 'Control Panel'
@aras-p
aras-p / preprocessor_fun.h
Last active August 3, 2026 21:06
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@lpereira
lpereira / partial.c
Last active January 29, 2023 20:12
Partial functions in C This program illustrates a hack to create partial functions in C. The way it works is that it generates a template function (partial_template_function) with known pointers, that is later copied to a region of memory obtained with mmap(), patched up with the address and data to be passed to the real function, and then made …
/*
* Partial applied functions in C
* Leandro Pereira <leandro@tia.mat.br>
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: