Skip to content

Instantly share code, notes, and snippets.

View binarybaba's full-sized avatar
✍️

Amin Mohamed Ajani binarybaba

✍️
View GitHub Profile
@binarybaba
binarybaba / git-mv-with-history
Created February 10, 2022 00:55 — forked from emiller/git-mv-with-history
git utility to move/rename file or folder and retain history with it.
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@binarybaba
binarybaba / cookies.js
Created April 21, 2021 12:52 — forked from thinkclay/cookies.js
Cookie CRUD in JS
/**
* Custom Cookie Support for JS
*
* There aren't very many great ways of interacting with Cookies
* in either native JS or jQuery without the use of plugins
* so this snippet aims to give you quick and easy access
* to manipulate your cookies with native JS
*
* @author Clay McIlrath
* @link http://thinkclay.com/technology/add-edit-delete-cookies-with-javascript
@binarybaba
binarybaba / box-shadow.html
Created August 23, 2017 13:44 — forked from ocean90/box-shadow.html
CSS3 Box Shadow, only top/right/bottom/left and all
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
@binarybaba
binarybaba / README.md
Created March 18, 2017 10:45 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
const eventMap = {
onClick: 'click',
onChange: 'change',
onKeyDown: 'keydown',
onKeyUp: 'keyup'
}
const ROOT_KEY = '__rektroot_';
const instancesByRootID = {};
let ROOT_ID = 1;