Skip to content

Instantly share code, notes, and snippets.

View valentinzberea's full-sized avatar

Valentin Zberea valentinzberea

View GitHub Profile
@valentinzberea
valentinzberea / about.md
Created August 9, 2011 13:42 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
[TestClass]
public static class Initializer
{
[AssemblyInitialize]
public static void InitFactories(TestContext context)
{
var factoryTypes = Assembly.GetExecutingAssembly()
.GetTypes().Where(x => x.Name.EndsWith("Factory"))
.ToList();

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

# 1. Initialization code:
logged_user = window.user
# Properties for each event
mixpanel.register(
'User Account': logged_user.getUserAccount()
'Whitelabel': logged_user.getUserType()
)
# People settings
mixpanel.name_tag(logged_user.getNameTag())
@valentinzberea
valentinzberea / pre-commit
Last active August 29, 2015 13:56
Pre-commit hook for coffeescript-jshint
git diff --staged --name-only | xargs coffee-jshint -g define,$,_,setTimeout,start,window
if [[ $? -ne 0 ]]; then
echo 'WARNING: You are about to commit files with coffee-jshint warnings'
exit 1
fi
<!doctype html>
<meta charset="utf-8" />
<title>React Router Boilerplate<style id="jsbin-css">
.crumbs li {
display: inline-block;
margin-left: 10px;
}
</style>
</title>
<body>
@valentinzberea
valentinzberea / craft-conf-2015
Created April 10, 2015 15:06
Talk selection for Craft Conf 2015
THEO SCHLOSSNAGLE (Circonus) - Techniques and tools for a coherent discussion about performance in complex architectures
MITCHELL HASHIMOTO (Hashicorp) - Automating the Modern Datacenter, Development to Production
MARTIN KLEPPMANN (LinkedIn) - Using logs to build a solid data infrastructure
CAITIE MCCAFFREY (Twitter) - Implementing the Saga Pattern
TAMMER SALEH (Pivotal) - Microservice AntiPatterns
PAUL BUTCHER (Ten Tenths Consulting, Pragmatic Programmers) - Concurrency: It's harder (and easier) than you think
JEREMY EDBERG (Netflix) - Building Reliable Distributed Data Systems
COREY HAINES (CoreyHaines) - Fun with the lambda calculus
DAVID NOLEN (Cognitect) - The Front End Architecture Revolution
MICHAEL NYGARD (Cognitect) - Architecture without an end state
mkdir -p ~/.docker
brew cask install dockermachine
docker-machine create --driver virtualbox default
@valentinzberea
valentinzberea / game.py
Last active November 25, 2015 15:52
Game exercise from LPTHW by Ionut
import random
pocket_list = []
table_phrase = "You put it in your pocket. "
def table_book():
@valentinzberea
valentinzberea / counter.py
Created April 11, 2016 11:30
Counting number of appearances
from collections import Counter
from random import randint
v = [randint(1, 10) for i in range(100)]
c = Counter(v)
for el in c.most_common():
print(el)