Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
github就是我编程的一个个人网站,静态博客,内容。

熊潇 abearxiong

💭
github就是我编程的一个个人网站,静态博客,内容。
  • hangzhou china
View GitHub Profile
@abearxiong
abearxiong / article.rb
Last active Apr 18, 2019
jekyll中创建一个新的post文章
View article.rb
#!/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 Apr 18, 2019
第一次测试
View dd.py
def good:
print("good")
@abearxiong
abearxiong / important.markdown
Last active Apr 29, 2019
程序员资料网站
View important.markdown
  1. github [52.74.223.119]
  2. csdn.net [47.95.47.253]
  3. jianshu.com [106.75.17.181]
View alias.markdown

alias 命令 2019.4.27

添加alias别名

alias name=`$shell cmd`

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

查看alias别名

View slideToggle.js
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
tampermonkey插件 web gists装饰器
View new-web.gists.decoration.user.js
// ==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
tampermonkey 学习笔记
View way_to.use.local.js.md

tampermonkey 本地引用js文件

Prepare in advance

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

coding

tampermonkey

// ==UserScript==
View way_run.string.js.md

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

Known

  1. 使用eval("要执行的字符串")
  2. 使用new Function("要执行的字符串")
  3. setTimeOut("要执行的字符串",500)
  4. setInterval("要执行的字符串",500)
View sleep_async.js
function sleep(ms){
return new Promise((resolve)=>setTimeout(resolve,ms));
}
async function test(){
var temple=await sleep(1000);
console.log(1111)
return temple
}
test();
View powershell-grep.md
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