Skip to content

Instantly share code, notes, and snippets.

# This is Git's per-user configuration file.
[user]
# Please adapt and uncomment the following lines:
# name = Tomek Romaniuk
# email = roman@Tomeks-MacBook-Pro.local
[color]
ui = auto
[alias]
co = checkout
ci = commit
Set-WindowsExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
cinst GoogleChrome
cinst VisualStudio2013Ultimate
cinst resharper
cinst notepadplusplus
cinst fiddler4
cinst dotpeek
cinst virtualbox
public static void Invoke(Func<int> func)
{
int result = 0;
try
{
result = func();
}
catch (Exception)
{
//oblsuga bledow
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
@echo off
tasklist /FI "IMAGENAME eq hipchat.exe" 2>NUL | find /I /N "hipchat.exe">NUL
if "%ERRORLEVEL%"=="0" taskkill /f /im "hipchat.exe"
start /b /d "%ProgramFiles(x86)%\Atlassian\HipChat" hipchat.exe
exit
foreach(var user in users)
{
Console.WriteLine(user.Name);
}
users.ToObservable()
.Subscribe(x => Console.WriteLine(x.Name))
public interface IEnumerable<T>
{
rm -r /Library/Frameworks/Mono.framework
rm -r /Library/Receipts/MonoFramework-*
rm /Users/roman/.config/.mono
for dir in /usr/bin /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man5; do
(cd ${dir};
for i in `ls -al | grep /Library/Frameworks/Mono.framework/ | awk '{print $9}'`; do
rm ${i}
done);
done
def map(collection, fun \\ &(&1)) do
map_impl(collection, &spawn/1, &(invoke(fun, &1)))
end
def map!(collection, fun \\ &(&1)) do
map_impl(collection, &spawn_link/1, fun)
end
defp map_impl(collection, spawn_fun, fun) do
me = self
def page(query, from, limit) do
from m in query,
where: m.id > ^from,
limit: ^limit
end
def to_stream(query, repo, page_size \\ 100) do
Stream.resource(
fn -> 0 end,
defmodule IntegrationMonitor.FooBar do
def start_link do
import Supervisor.Spec
children = [supervisor(IntegrationMonitor.Foo, [], restart: :transient)]
Supervisor.start_link(children, strategy: :simple_one_for_one, max_restarts: 3, max_seconds: 20, name: __MODULE__)
end
def start_child do