Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Oleh Makarov lgmkr

Block or report user

Report or block lgmkr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View storybook requirements
npm install --save-dev @babel/core @babel/preset-env
View index.js
#!/usr/bin/env node
console.log('Hello world!')
@lgmkr
lgmkr / install-mit-schema-for-SICP.md
Created Dec 30, 2017 — forked from deepak/install-mit-schema-for-SICP.md
installing MIT-scheme for doing SICP
View install-mit-schema-for-SICP.md

installing MIT Schema

The SICP page recommends MIT scheme,
so that is what we will use

to install it, on Apple OSX using Homebrew:

  brew tap x11
  brew cask install xquartz
View writing-your-own-rx.js
var f = x => x * 10
f(100) //=> 1000
var f = x => console.log(x * 10)
f(100) //=> 1000
(x => console.log(x * 10))(10) //=> 100
(10)(x => console.log(x*10)) // Error
@lgmkr
lgmkr / count_words.py
Last active Nov 3, 2016
How to analyse text and count word frequencies in python
View count_words.py
import re
import string
frequency = {}
document_text = open('test.txt', 'r')
text_string = document_text.read().lower()
match_pattern = re.findall(r'\b[a-z]{3,15}\b', text_string)
for word in match_pattern:
count = frequency.get(word,0)
View rspec_cheatsheet_controller_spec.rb
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
context "GET index" do
#context "POST create" do
#context "GET show" do
#context "PATCH update" do (or PUT update)
#context "DELETE destroy" do
#context "GET new" do
View .tmux.conf
set-window-option -g xterm-keys on
set-window-option -g mode-keys vi
# bind for use vim-like copy/paste in scroll mode
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# bind for reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded."
View REST & Hypermedia APIs.md

Figure out a good standard for how to use the HTTP response codes in a 'truly RESTful' (Now called 'Hypermedia API' apparently) way.

Summary

View boot2docker cert problem fix and TLS disable
Boot2Docker-cli version: v1.7.1
Git commit: 8fdc6f5
docker: 1.7.1, build 786b29d
boot2docker ssh
sudo curl -o /var/lib/boot2docker/profile https://gist.githubusercontent.com/garthk/d5a17007c277aa5c76de/raw/3d09c77aae38b4f2809d504784965f5a16f2de4c/profile
sudo halt
#maybe reboot macosx
#reboot(powerof) boot2docker vm manualy in VM GUI
boot2docker up
You can’t perform that action at this time.