Skip to content

Instantly share code, notes, and snippets.

View abearxiong's full-sized avatar
💭
coding

熊潇 abearxiong

💭
coding
  • china
View GitHub Profile
@abearxiong
abearxiong / article.rb
Last active April 18, 2019 09:32
jekyll中创建一个新的post文章
#!/usr/bin/ruby
# -*- coding: UTF-8 -*-
# 2018-11-07 15:40
task :newart,[:article,:title,:categories,:tags,:description] do |t,args|
time = Time.new #Get new time
timeinfos = time.to_s.split(" ")
path ="_posts/"
filename= args["article"].gsub(" ","-")
suffix = ".markdown"
newfile = path+timeinfos[0]+"-"+filename+suffix
@abearxiong
abearxiong / dd.py
Last active April 18, 2019 10:54
第一次测试
def good:
print("good")
@abearxiong
abearxiong / important.markdown
Last active April 29, 2019 13:32
程序员资料网站
  1. github [52.74.223.119]
  2. csdn.net [47.95.47.253]
  3. jianshu.com [106.75.17.181]

alias 命令 2019.4.27

添加alias别名

alias name=`$shell cmd`

永久添加alias--在/home目录或其他目录找到.bashrc,在相应位置添加类似上面命令,添加别名(有相应位置,看得到alias其他的)

查看alias别名

var link = $(link) //把元素绑定到JQuery对象
//console.log(link.next()) //下一个兄弟节点 parent() ,children()
var downChild = link.next()
downChild.slideToggle() // 当点击按钮,显示或隐藏元素
@abearxiong
abearxiong / new-web.gists.decoration.user.js
Last active May 2, 2019 10:37
tampermonkey插件 web gists装饰器
// ==UserScript==
// @name 关于web gists 的装饰
// @name:en web gists decoration
// @namespace https://github.com/abearxiong/
// namespace https://gists.github.com/
// @version 1.0.0
// @icon https://github.githubassets.com/favicon.ico
// @description 悬浮显示目录
// @homepageURL https://github.com/abearxiong/web-gists-decoration
// homepage https://gist.github.com/abearxiong/dab578c4c075993c16757f774ab09927/
@abearxiong
abearxiong / way_to.use.local.js.md
Last active May 3, 2019 03:33
tampermonkey 学习笔记

tampermonkey 本地引用js文件

Prepare in advance

chrome://extensions 把tampermonkey的[运行访问网址]勾上

coding

tampermonkey

// ==UserScript==

执行字符串类型的函数代码

Known

  1. 使用eval("要执行的字符串")
  2. 使用new Function("要执行的字符串")
  3. setTimeOut("要执行的字符串",500)
  4. setInterval("要执行的字符串",500)
function sleep(ms){
return new Promise((resolve)=>setTimeout(resolve,ms));
}
async function test(){
var temple=await sleep(1000);
console.log(1111)
return temple
}
test();
Usage: grep [OPTION]... PATTERN [FILE]...
Search for PATTERN in each FILE.
Example: grep -i 'hello world' menu.h main.c

Pattern selection and interpretation:
  -E, --extended-regexp     PATTERN is an extended regular expression
  -F, --fixed-strings       PATTERN is a set of newline-separated strings
  -G, --basic-regexp        PATTERN is a basic regular expression (default)
  -P, --perl-regexp         PATTERN is a Perl regular expression