Skip to content

Instantly share code, notes, and snippets.

View Hinidu's full-sized avatar
🇷🇺
Enjoying liberalism

Pavel Platto Hinidu

🇷🇺
Enjoying liberalism
  • Panzerdog Oy
  • Kaliningrad, Russia
View GitHub Profile
Settings:
duration: 1.0 s
## CacheBench
[20:23:21] 1/4: failed filename lookup
[20:23:30] 2/4: failed term lookup
[20:23:33] 3/4: successful filename lookup
[20:23:34] 4/4: successful term lookup
Finished in 14.44 seconds
@Hinidu
Hinidu / erlang-elixir-on-amazon-linux.md
Last active July 20, 2017 09:35 — forked from techgaun/erlang-elixir-on-amazon-linux.md
Running elixir 1.4 on amazon linux

pre-install

sudo yum install ncurses-devel openssl-devel

install erlang

sudo yum groupinstall "Development Tools"
wget "http://erlang.org/download/otp_src_19.3.tar.gz" -O otp19.tar.gz
tar xfz otp19.tar.gz
cd otp_src_19.3/
./configure

make

using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
namespace DynamicData.Tests.External
{
class Student
{
public int Id { get; }
public string Name { get;}
@Hinidu
Hinidu / fix1
Created April 20, 2015 15:35
Insight.Database issue 197
using System;
using Insight.Database;
using Npgsql;
namespace Insight
{
public interface IRepository
{
[Sql("SELECT a + b FROM (SELECT :a AS a, :b AS b) AS t")]
int Sum(IBar bar);
import System.Directory
import System.Environment
import System.FilePath
import Control.Applicative ((<$>))
import Control.Arrow (first, second)
import Control.Monad (void)
import Data.Either (rights)
import Data.List (isSuffixOf)
import Data.Set (Set, (\\), empty, fromList, insert, singleton, toList, union)
import Text.Parsec
#!/bin/sh
function process_file() {
[ -z "$FILE" -o -z "$RANGES" ] && return 0
echo -e $RANGES | sed 's/-/,/' | sort -nr | while read RANGE
do
sed -i $RANGE"d" $FILE
done
FILE=""
RANGES=""
#!/usr/bin/env python
import json
import subprocess
import sys
def run(cmd):
stringCmd = u" ".join(cmd)
subprocess.call(stringCmd, shell=True)