Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
(* | |
This gist runs a 3 in memory node EventStore cluster | |
and a client that send messages to the cluster | |
To use the web interface, copy EventStore web folders. | |
You can found them in the server distribution at http://geteventstore.com/downloads/. | |
Then connect to http://localhost:2113/ | |
You can view the cluster status at: | |
http://localhost:2113/web/gossip.htm |
let subscribeAsAsyncSeq (conn:IEventStoreConnection) (stream:string) (resolveLinks:bool) (bufferSize:int) (ct:CancellationToken) = asyncSeq { | |
use buffer = new System.Collections.Concurrent.BlockingCollection<ResolvedEvent>(bufferSize) | |
let inline onEvent subs (evt:ResolvedEvent) = | |
buffer.Add(evt) | |
let inline onDrop (subs:EventStoreSubscription) (reason:SubscriptionDropReason) (ex:exn) = | |
printfn "SUBSCRIPTION DROPPED! last position=%i reason=%O ex=%O" (subs.LastEventNumber.GetValueOrDefault()) reason ex | |
() | |
let! subs = conn.SubscribeToStreamAsync(stream, resolveLinks, Action<_,_>(onEvent), Action<_,_,_>(onDrop), null) |> Async.AwaitTask | |
yield! buffer.GetConsumingEnumerable(ct) |> AsyncSeq.ofSeq | |
} |
# Works for me. You may need to tweak it. Stick it in your powershell profile FTW | |
function Rename-Project | |
{ | |
# designed to run from the solution directory where the project is a child directory | |
param( | |
[string]$projectName=$(throw "projectName required."), | |
[string]$newProjectName=$(throw "newProjectName required.") | |
) | |
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Collections.Concurrent; | |
namespace Praeclarum | |
{ | |
/// <summary> | |
/// Wraps a value and only allows access to it using a single thread | |
/// of execution (see SingleThreadQueue). |
#!/bin/sh | |
echo Install all AppStore Apps at first! | |
# no solution to automate AppStore installs | |
read -p "Press any key to continue... " -n1 -s | |
echo '\n' | |
echo Install and Set San Francisco as System Font | |
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)" | |
echo Install Homebrew, Postgres, wget and cask | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" |
package main | |
import ( | |
"bytes" | |
"code.google.com/p/go.crypto/openpgp" | |
"code.google.com/p/go.crypto/openpgp/armor" | |
"fmt" | |
"io/ioutil" | |
"log" | |
) |
#!/usr/bin/env ruby | |
require 'octokit' | |
pass_re = /^password: "(.*)"$/ | |
token = `security find-generic-password -s "GitHub API Token" -g 2>&1 | grep "password"`.match(pass_re)[1] | |
c = Octokit::Client.new(:access_token => token) | |
user_login = c.user.login |
#include<stdio.h> | |
main() | |
{ | |
printf("Hello World"); | |
} |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
require 'formula' | |
class Macvim < Formula | |
homepage 'http://code.google.com/p/macvim/' | |
url 'https://github.com/b4winckler/macvim/tarball/snapshot-66' | |
version '7.3-66' | |
sha1 'd11696f7089688fa96a45fc57410c60f6ca5a394' | |
head 'https://github.com/b4winckler/macvim.git', :branch => 'master' |