Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
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
GeekaholicLin / introrx.md
Created Oct 7, 2018 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
View introrx.md
@GeekaholicLin
GeekaholicLin / overwatch-2-year-anniversary-url.txt
Last active Jun 3, 2018
守望先锋两周年海报 - 壁纸
View overwatch-2-year-anniversary-url.txt
http://www.thevideogamegallery.com/gallery/image:41206/overwatch:anniversary-2018
@GeekaholicLin
GeekaholicLin / lint.sh
Last active May 8, 2018
pre-receive hooks for eslint and stylelint
View lint.sh
#! /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
View eslint-pushed-changes.sh
#!/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 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
GeekaholicLin / geekaholic-test.xml
Last active Sep 23, 2017
sync windows application xml file[testing example]
View geekaholic-test.xml
<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 Sep 20, 2017 — forked from evanwill/gitBash_windows.md
how to add more utilities to git bash for windows, wget, make
View gitBash_windows.md

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 Sep 18, 2017
what is side effect in programming?
View side-effect.md
除了返回值以外,影响到函数外部的任何东西(显示器、网络、文件、全局变量等)的效果都叫side effect
@GeekaholicLin
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) {
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();