Skip to content

Instantly share code, notes, and snippets.

View goqadze's full-sized avatar
🕊️
-

Avtandil Gokadze goqadze

🕊️
-
View GitHub Profile
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
function zip(...iterables) {
const iterators = iterables.map(i => i[Symbol.iterator]());
let done = false;
return {
[Symbol.iterator]() {
return this;
},
next() {
if (!done) {
const items = iterators.map(i => i.next());
sudo mkdir /c
sudo mount --bind /mnt/c /c
cd /c/path/to/project
@goqadze
goqadze / app.js
Last active January 18, 2018 13:13
Redux, Implementing Store, Dispatching Actions Asynchronously with Thunks
// FAKEAPI
let id = 0;
const v4 = () => ++id;
const fakeDatabase = {
todos: [{
id: v4(),
text: `hey`,
completed: true,
}, {
@goqadze
goqadze / app.js
Created January 5, 2018 12:05
Redux: Implementing Store
const createStore = (reducer) => {
let state;
let listeners = [];
const getState = () => state;
const dispatch = (action) => {
state = reducer(state, action);
listeners.forEach(listener => listener())
};