Skip to content

Instantly share code, notes, and snippets.

View olegakbarov's full-sized avatar
🐢
Slow but inevitable

Oleg Akbarov olegakbarov

🐢
Slow but inevitable
View GitHub Profile
@olegakbarov
olegakbarov / cluster-capacity.json
Created October 16, 2017 13:48 — forked from zakharovvi/cluster-capacity.json
Kubernetes "Cluster Capacity" grafana dashboard
{
"annotations": {
"list": []
},
"editable": true,
"gnetId": null,
"graphTooltip": 2,
"hideControls": false,
"links": [
{
@olegakbarov
olegakbarov / clj_spec_playground.clj
Created October 4, 2017 09:40 — forked from ghoseb/clj_spec_playground.clj
Examples of Clojure's new clojure.spec library
(ns clj-spec-playground
(:require [clojure.string :as str]
[clojure.spec :as s]
[clojure.test.check.generators :as gen]))
;;; examples of clojure.spec being used like a gradual/dependently typed system.
(defn make-user
"Create a map of inputs after splitting name."
([name email]
@olegakbarov
olegakbarov / NERDTree.mkd
Created May 12, 2017 13:43 — forked from m3nd3s/NERDTree.mkd
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

(ns my.app
(:require
[aleph.http :refer :all]
[compojure.core :refer [defroutes GET]]
[compojure.handler :as handler]
[lamina.core :refer :all]
[com.netflix.hystrix.core :as hystrix]
[clj-http.client :as client]))
(defn get-pants []
@olegakbarov
olegakbarov / install-tensorflow.sh
Created December 10, 2016 20:29 — forked from erikbern/install-tensorflow.sh
Installing TensorFlow on EC2
# Note – this is not a bash script (some of the steps require reboot)
# I named it .sh just so Github does correct syntax highlighting.
#
# This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5
#
# The CUDA part is mostly based on this excellent blog post:
# http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/
# Install various packages
sudo apt-get update
@olegakbarov
olegakbarov / nginx.conf
Created November 10, 2016 09:14 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@olegakbarov
olegakbarov / README.md
Created July 12, 2016 19:52 — forked from Dr-Nikson/README.md
Auth example (react + redux + react-router)
import request from 'superagent';
import cheerio from 'cheerio';
import vo from 'vo';
import {readFile} from 'fs';
/**
* An example generator
*/
function *gen(init) {
//confusing because what is stored in `first` variables is not what is returned from
@olegakbarov
olegakbarov / 00_destructuring.md
Created January 17, 2016 23:10 — forked from john2x/00_destructuring.md
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors