Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

void GeekaholicLin

I may be slow to respond.
View GitHub Profile
View enhancedSelect.jsx
import React from 'react'
import IconTips from '@client/components/icon-tips'
import { funcOrValue } from '@client/utils/tool'
import './index.scss'
const IconPrefixCls = 'block-icon'
export default SelectComponent => class extends SelectComponent {
childStopPropagationEvent(e) {
GeekaholicLin /
Created Oct 7, 2018 — forked from staltz/
The introduction to Reactive Programming you've been missing
GeekaholicLin / overwatch-2-year-anniversary-url.txt
Last active Jun 3, 2018
守望先锋两周年海报 - 壁纸
View overwatch-2-year-anniversary-url.txt
GeekaholicLin /
Last active May 8, 2018
pre-receive hooks for eslint and stylelint
#! /bin/bash
date_start=$(date +%s)
# colors const
red='\033[1;31m' # error
green='\033[1;32m' # success
yellow='\033[1;33m' # warning
cyan='\033[1;36m' # info
no_color='\033[0m' # No Color
# console func
TEMPDIR=`mktemp -d`
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
GeekaholicLin / monokai.css
Created Jan 30, 2018
monokai.css in ylion theme
View monokai.css
#post #post-body .highlight {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #23241F
#post #post-body .highlight:before{
background: #23241F;
border-top: none;
GeekaholicLin / geekaholic-test.xml
Last active Sep 23, 2017
sync windows application xml file[testing example]
View geekaholic-test.xml
<license name="org.gnu.GPLv2">
<title>Dependency Walker license</title>
<package name="com.Geekaholic.MySQLCommunityServer64">
<title>Geekaholic--MySQL Community Server 64 bit</title>
<description>SQL database x86_64</description>
GeekaholicLin /
Created Sep 20, 2017 — forked from evanwill/
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 /
Created Sep 18, 2017
what is side effect in programming?
除了返回值以外,影响到函数外部的任何东西(显示器、网络、文件、全局变量等)的效果都叫side effect
GeekaholicLin / angular-validation-config.js
Created Sep 13, 2017
[angular-validation] Focus and scrollTo invalid field in Form,making non-input field under consideration
View angular-validation-config.js
/* Edited by Geekaholic */
/* For scrollTo invalid form field*/
let timer = null;
$validationProvider.invalidCallback = function(element) {
timer = setTimeout(function () {
let isEditing = angular.element('input:focus')[0];//是否正在编辑,用户体验
let offset = angular.element('.form-group.has-error').offset();