Skip to content

Instantly share code, notes, and snippets.

View wileam's full-sized avatar
🐱

Joanna Wu wileam

🐱
View GitHub Profile
@wileam
wileam / findNthInJoinedDemloNumber.js
Last active August 17, 2020 06:33
nth in joined Demlo Number String
// What's the 2000th digit in
// 1121123211234321123454321...?
// Assumption:
// Assume it's a number of joined demlo number, https://mathworld.wolfram.com/DemloNumber.html
// find the nth digit in the number.
function findNthDigitInJoinedDemloNumber(n) {
// find the rowIndex of demlo number and the charAtIndex of that number
const rowIndex = Math.ceil(Math.sqrt(n));
@wileam
wileam / waka-box
Created July 30, 2020 03:39
waka-box
test
@wileam
wileam / delete_merged_remote_branches.sh
Created August 23, 2016 10:51 — forked from Emuentes/delete_merged_remote_branches.sh
Delete remote git branches that have been merged into develop
# Breakdown of the process
# NOTE: I am searching for branches merged into Develop because I'm using GiT flow
# 1) git branch -r --merged develop
# Get remote branches that have been merged into develop
# 2) grep -v -E '(\*|master|develop)'
# From those branches returned by the above command,
# exclude: master, develop, & the currently selected branch (the branch name beggining with an asterisk)
@wileam
wileam / sublime-command-line.md
Created August 2, 2016 05:54 — forked from adrianorsouza/sublime-command-line.md
launch sublime text from the command line

Launch Sublime Text from the command line on OSX

Sublime Text includes a command line tool, subl, to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.

Requirements

  • Sublime text 2 or 3 installed in your system within Applications folder

Setup

@wileam
wileam / doumailBack.user.js
Last active August 29, 2015 14:21
Doumail Back and Remove Douban App Ads.
// ==UserScript==
// @name Doumail Back & Remove Douban App Ads
// @author Ivan Jiang(iplus26) & Joanna Wu(wileam)
// @match *.douban.com/*
// @grant none
// ==/UserScript==
//
// 标题
@wileam
wileam / loading.css
Created April 16, 2015 09:53
loading dots css animation
.loading {
font-size: 30px;
}
.loading:after {
overflow: hidden;
display: inline-block;
vertical-align: bottom;
-webkit-animation: ellipsis steps(4,end) 900ms infinite;
animation: ellipsis steps(4,end) 900ms infinite;
@wileam
wileam / .zshrc
Created February 3, 2015 18:02
.zshrc
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Uncomment the following line to use case-sensitive completion.
@wileam
wileam / meta.html
Last active August 29, 2015 14:11
meta
<!-- From 一丝姐姐,详细说明:https://github.com/yisibl/blog/issues/1-->
<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
<meta charset='utf-8'> <!-- 声明文档使用的字符编码 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <!-- 优先使用 IE 最新版本和 Chrome -->
<meta name="description" content="不超过150个字符" /> <!-- 页面描述 -->
<meta name="keywords" content=""/> <!-- 页面关键词 -->
<meta name="author" content="name, email@gmail.com" /> <!-- 网页作者 -->
@wileam
wileam / css-ellipsis.css
Last active August 29, 2015 14:11
多行溢出省略
//webkit
p {
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
//opera
@wileam
wileam / variable.less
Created November 27, 2014 07:36
Base css
@sansFontFamily: Arial, "Hiragino Sans GB","Microsoft Yahei", "微软雅黑",sans-serif;
@serifFontFamily: Georgia, "Times New Roman", Times, "SimSun","宋体",serif;