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 / vim8_build.md
Last active October 26, 2019 08:48
WLS Ubuntu 18 编译 vim8

相关命令:

# 移除原有的
sudo apt-get remove vim vim-runtime gvim

# 依赖安装
sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \
@GeekaholicLin
GeekaholicLin / vsc.md
Last active August 11, 2019 02:34
windows环境的命令行下使用visual studio code创建或打开文件
  1. 先将visual studio code 的安装目录(有着code.exe的文件)添加到环境变量Path中

2.使用一下命令:

code -- opens Visual Studio Code 
code . -- opens current directory in Visual Studio Code 
code somefile -- opens somefile in Visual Studio Code
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 / config_virtualbox_xxnet.md
Last active September 9, 2018 13:50
virtualbox 共享host os的xx-net

最怕的就是各种配置,每次都得搜索很多,不断地折腾。

今天遇到了将本机的xx-net和虚拟机中的系统共享网络的需要,其实这个并不难。比如,在virtualbox中的网络设置,将网络模式设置为NAT连接就好。

但是,无论怎么设置都不能使得virtualbox中的Linux Mint共享XX-NET翻墙,也就是说不能在virtualbox宿主机器里面进行Google搜索

经过一番搜索,终于解决了,记下来,以方便以后自己或者遇到相同的问题的小伙伴。

    1. 设置xxnet为局域网共享状态。具体做法为:在XX-Net\data\gae_proxy目录下,备份config.iniconfig.ini.bak,然后编辑config.ini,部分设置如下。
@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 / js_Palindromes.md
Created August 29, 2016 15:33
js 去除标点符号/空格且忽略大小写的回文串判定
function palindrome(str) {
  // Good luck!
  // \W -->匹配所有的字母、数字、下划线以外的字符
  str = str.replace(/\W|_/g,'').toLowerCase();
  var arrMaxIndex = str.length -1;
  for(var i = 0;i <=arrMaxIndex/2;i++){
    if(str.charAt(i)!==str.charAt(arrMaxIndex-i)){
      return false;
 }