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
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
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 / overwatch-2-year-anniversary-url.txt
Last active June 3, 2018 14:45
守望先锋两周年海报 - 壁纸
http://www.thevideogamegallery.com/gallery/image:41206/overwatch:anniversary-2018
@GeekaholicLin
GeekaholicLin / lint.sh
Last active May 8, 2018 13:39
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
@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 / monokai.css
Created January 30, 2018 04:45
monokai.css in ylion theme
#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
GeekaholicLin / geekaholic-test.xml
Last active September 23, 2017 16:48
sync windows application xml file[testing example]
<root>
<license name="org.gnu.GPLv2">
<title>Dependency Walker license</title>
<url>http://www.dependencywalker.com/</url>
</license>
<package name="com.Geekaholic.MySQLCommunityServer64">
<title>Geekaholic--MySQL Community Server 64 bit</title>
<url>http://www.mysql.com/downloads/mysql</url>
<description>SQL database x86_64</description>
<icon>
@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 / side-effect.md
Created September 18, 2017 14:49
what is side effect in programming?
除了返回值以外,影响到函数外部的任何东西(显示器、网络、文件、全局变量等)的效果都叫side effect
@GeekaholicLin
GeekaholicLin / angular-validation-config.js
Created September 13, 2017 09:00
[angular-validation] Focus and scrollTo invalid field in Form,making non-input field under consideration
/* Edited by Geekaholic */
/* For scrollTo invalid form field*/
let timer = null;
$validationProvider.invalidCallback = function(element) {
element.closest('.form-group').addClass('has-error');
if(!timer){
timer = setTimeout(function () {
let isEditing = angular.element('input:focus')[0];//是否正在编辑,用户体验
if(!isEditing){
let offset = angular.element('.form-group.has-error').offset();