- Disable screen sleep
- In order to set proper screen resolution set your /boot/config.txt content as following:
disable_overscan=1
hdmi_group=1
hdmi_mode=16
module PolishCalc | |
OPERATORS = { | |
"+" => {:priority => 0, :arity => 2}, | |
"-" => {:priority => 0, :arity => 2}, | |
"*" => {:priority => 1, :arity => 2}, | |
"/" => {:priority => 1, :arity => 2} | |
} | |
class Stack |
$ curl -X GET "http://localhost:9200/videos/_search?from=0&load=true&size=10&pretty=true" -d ' | |
{ | |
"query" : | |
{ | |
"filtered" : | |
{ | |
"query": | |
{ | |
"match_all":{} | |
}, |
" Ignore some folders and files for CtrlP indexing | |
let g:ctrlp_custom_ignore = { | |
\ 'dir': '\.git$\|\.sass-cache$|\.hg$\|\.svn$\|\.yardoc\|public$|log\|tmp$', | |
\ 'file': '\.so$\|\.dat$|\.DS_Store$' | |
\ } |
module M where | |
sum_of_squares :: Int -> Int | |
sum_of_squares n = sum . filter odd . map(^2) $ take n [1..] | |
sum_of_squares_dotless :: Int -> Int | |
sum_of_squares_dotless = sum . filter odd . map(^2) . (enumFromTo 1) | |
main :: IO() | |
main = do |
-module(benchmark). | |
-author('[email protected]'). | |
-export([run/1]). | |
run(Count) -> | |
Keys = lists:seq(1, Count), | |
lists:foreach( | |
fun ({F, TargetName}) -> | |
{[SetRunTime, SetWallClock], [GetRunTime, GetWallClock]} = F(Keys), |
mkdir sample && cd sample/ | |
rebar create-app appid=sample | |
mkdir rel && cd rel/ | |
rebar create-node nodeid=sample | |
cd .. | |
Дальше создаём rebar.config (если его ещё нет): | |
cat rebar.config |
class Hbase < Formula | |
homepage "http://hbase.apache.org" | |
url "http://apache-mirror.rbc.ru/pub/apache/hbase/hbase-0.98.11/hbase-0.98.11-hadoop2-bin.tar.gz" | |
sha1 "f44551ed7f1e078e6d1fc17385ffb762c815f14a" | |
depends_on "hadoop" | |
def install | |
rm_f Dir["bin/*.cmd", "conf/*.cmd"] | |
libexec.install %w[bin conf docs lib hbase-webapps] |
disable_overscan=1
hdmi_group=1
hdmi_mode=16
#!/bin/bash | |
if [ "$#" -eq 0 ]; then | |
echo "USAGE: ./forward_ports.sh 1234 5678" | |
exit 1 | |
fi | |
for port; do | |
echo "Forwarded port $port" | |
VBoxManage controlvm boot2docker-vm natpf1 "tcp-port$port,tcp,127.0.0.1,$port,,$port" |
class Postgresql96 < Formula | |
desc "Relational database management system" | |
homepage "https://www.postgresql.org/" | |
version = "9.6.0" | |
url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" | |
sha256 "3b5fe9634b80a4511aac1832a087586a7caa8c3413619562bdda009a015863ce" | |
head do | |
url "https://git.postgresql.org/git/postgresql.git", :branch => "REL9_6_STABLE" |