Skip to content

Instantly share code, notes, and snippets.

View GeekaholicLin's full-sized avatar
💭
I may be slow to respond.

void GeekaholicLin

💭
I may be slow to respond.
View GitHub Profile
@GeekaholicLin
GeekaholicLin / introrx.md
Created October 7, 2018 12:57 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@GeekaholicLin
GeekaholicLin / eslint-pushed-changes.sh
Created May 4, 2018 10:49 — forked from stalniy/eslint-pushed-changes.sh
ESLINT + pre-receive git hook
#!/bin/bash
TEMPDIR=`mktemp -d`
ESLINTRC=$TEMPDIR/.eslintrc
COMMAND="eslint --color -c $ESLINTRC --rule 'import/no-unresolved: 0' --rule 'import/no-duplicates: 0' --rule 'import/export: 0'"
git show HEAD:.eslintrc > $ESLINTRC
echo "### Ensure changes follow our code style... ####"
# See https://www.kernel.org/pub/software/scm/git/docs/githooks.html#pre-receive
@GeekaholicLin
GeekaholicLin / gitBash_windows.md
Created September 20, 2017 09:51 — forked from evanwill/gitBash_windows.md
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows is bundled with "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available. (Note: a portable alternative is Cmder, the full version comes bundled with Git Bash, notes here.)

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on). If you are missing a utility, such as wget, track down a binary for

@GeekaholicLin
GeekaholicLin / post-merge
Last active August 17, 2017 03:10 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
# Or run the following commond in unix-like terminal
# curl -O https://gist.githubusercontent.com/GeekaholicLin/63d03a960eea595e543116dd5de07080/raw/d22bfce02c62e74ebe38e6252c2165061d9aa495/post-merge && chmod +x post-merge && mv post-merge .git/hooks/
changed_files="$(git diff-tree -r --name-only --no-commit-id HEAD^ HEAD)"
check_run() {
@GeekaholicLin
GeekaholicLin / 0_reuse_code.js
Created June 19, 2017 04:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@GeekaholicLin
GeekaholicLin / Webstorm Keymaps
Created April 16, 2017 09:26 — forked from ivikash/Webstorm Keymaps
Keymaps and Keycodes for webstorm
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb
$SelectAll <M-A>
$Undo <M-Z>
/*
* Minimal classList shim for IE 9
* By Devon Govett
* MIT LICENSE
*/
if (!("classList" in document.documentElement) && Object.defineProperty && typeof HTMLElement !== 'undefined') {
Object.defineProperty(HTMLElement.prototype, 'classList', {
get: function() {
@GeekaholicLin
GeekaholicLin / prototype.css
Created May 23, 2016 03:10 — forked from anonymous/prototype.css
Prototype created with DevTools Prototyper
.box {
width: 300px;
height: 300px;
border: 1px solid #000;
background: -moz-repeating-linear-gradient(-30deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0) 150px, rgba(255, 255, 255, 0) 200px, rgba(255, 255, 255, 0.6) 200px, rgba(255, 255, 255, 0.6) 215px) no-repeat -300px 0, #000 no-repeat;