Skip to content

Instantly share code, notes, and snippets.

View halfzebra's full-sized avatar

Eduard Kyvenko halfzebra

View GitHub Profile
@halfzebra
halfzebra / PROPOSAL.md
Last active March 23, 2018 17:12
How Create React App changed the way I work

This gist is a proposal for lightning talk at Reactive Conf 2017

Like the idea? Give me a 🌟 and see you in Bratislava!

How Create React App changed the way I work

Hello, my name is Eduard!

I'm the maintainer of Create Elm App and contributor to Create React App and Webpack

# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
SSH_ENV="$HOME/.ssh/environment"
function start_agent {
echo "Initialising new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
/usr/bin/ssh-add;
}
function powerOf10LessThan(number) {
return Math.floor(Math.log10(number))
}
function step(number) {
return value + (10 ** powerOf10LessThan(number))
}
function stepMany(number, steps) {
let res = value
@halfzebra
halfzebra / index.js
Last active December 28, 2018 12:12
State Machine with Async Transitions
// Async Generator for implementing State Machines with asynchronous transitions.
//
// Try online: https://jsfiddle.net/ecf1bho9/
console.clear()
async function* state() {
let state = 0
let action
while (true) {
@halfzebra
halfzebra / .gitconfig
Last active September 26, 2024 12:48
Simple Git Config
[user]
name = Your Name
email = [email protected]
[core]
autocrlf = input
safecrlf = false
ignorecase = false
excludesfile = ~/.gitignore
[branch]
autosetuprebase = never
console.clear()
function isBalanced(input) {
let stack = []
const length = input.length
for (let i = 0; i < length; i++) {
if (input[i] === '(') {
stack.push('(')
} else {