Skip to content

Instantly share code, notes, and snippets.

View fanyer's full-sized avatar

Fy fanyer

  • Somewhere on Earth
View GitHub Profile
@fanyer
fanyer / array.extensions.md
Created October 7, 2017 21:35 — forked from rwaldron/array.extensions.md
Array.from and Array.of
@fanyer
fanyer / init.coffee
Last active July 3, 2017 13:13
atom-backup
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
/* @flow */
// these helpers produces better vm code in JS engines due to their
// explicitness and function inlining
export function isUndef (v: any): boolean %checks {
return v === undefined || v === null
}
export function isDef (v: any): boolean %checks {
@fanyer
fanyer / .tmux.conf
Created June 2, 2017 06:34 — forked from zhasm/.tmux.conf
tmux config
#ctrl a
set -g prefix ^a
unbind ^b
bind a send-prefix
#此类配置可以在命令行模式中输入show-options -g查询
#set-option -g base-index 1 #窗口的初始序号;默认为0,这里设置为1
set-option -g display-time 5000 #提示信息的持续时间;设置足够的时间以避免看不清提示,单位为毫秒
set-option -g repeat-time 1000 #控制台激活后的持续时间;设置合适的时间以避免每次操作都要先激活控制台,单位为毫秒
set-option -g status-keys emacs #操作状态栏时的默认键盘布局;可以设置为vi或emacs
set-option -g status-right "#(date +%H:%M' ')" #状态栏右方的内容;这里的设置将得到类似23:59的显示
CreateObject("WScript.Shell").Run "F:\aria2\aria2c.exe --conf-path=aria2.conf",0
function Rocker(name){
this.name = name;
};
Rocker.prototype.getName = function(){
return this.name;
}
//https://rockjins.github.io/2017/01/18/new-object/

Flat Notifications - FlatNotify.js v0.1

This is a Javascript plugin I am working on for floating notifications. It is a work in progress.

A Pen by Saransh Sinha on CodePen.

License.

@fanyer
fanyer / index.pug
Created December 15, 2016 19:02 — forked from anonymous/index.pug
Material Login Form
// Mixins
mixin input(type, label)
.input-container
input(type='#{type}' id='#{label}' required)
label(for='#{label}')=label
.bar
mixin button(text)
.button-container
button
span=text
@fanyer
fanyer / 404-svg.markdown
Created November 21, 2016 09:51 — forked from anonymous/404-svg.markdown
404 SVG
@fanyer
fanyer / index.html
Created November 21, 2016 02:25 — forked from anonymous/index.html
Tumblr iOS Loading animation in HTML & CSS
<ul>
<li></li>
<li></li>
<li></li>
</ul>