Skip to content

Instantly share code, notes, and snippets.

View weirongxu's full-sized avatar
🎯
Focusing

Raidou weirongxu

🎯
Focusing
View GitHub Profile
@weirongxu
weirongxu / gulpfile.coffee
Last active August 29, 2015 14:05
gulp snippet
gulp.task 'copy', ->
gulp.src 'assets/**'
.pipe plumber()
.pipe gulp.dest 'public/assets'
gulp.task 'jade', ->
gulp.src ['jade/**/*.jade', '!jade/common/**']
.pipe plumber()
.pipe jade
locals:
let M = transformer#middle()
let S = transformer#source()
call transformer#cmd('Html2jade')
\.src(S.smart())
\.stream(
\ M.pipe('html2jade - --donotencode --bodyless'),
\ M.smart()
\)
@weirongxu
weirongxu / components.styl
Last active August 29, 2015 14:05
My stylus
.pagination
@extend .clearfix
> li
display inline
float left
a, span
+xs-layout()
padding 3px 7px
font-size 14px
+sm-layout()
@weirongxu
weirongxu / download.py
Last active August 29, 2015 14:03
aria2c by uri file.
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import re, os
name = 'Video Name'
num = 1
for line in file('uri', 'r'):
p = re.compile(r'\..{1,5}\?')
@weirongxu
weirongxu / rsync-list
Last active August 29, 2015 14:00
rsync dotfile
# hosts
/etc/hosts
# dotfile
~/.config/smplayer/smplayer.ini
~/compiz_bacpup.profile
~/_gdbinit
~/.remmina/
~/.bashrc
~/.zshrc
@weirongxu
weirongxu / parseUrl.js
Last active August 29, 2015 13:55
js simple url parse.
(function() {
window.URL = function(href) {
this.href = href;
this.link = document.createElement('a');
this.link.href = href;
this.parse(this);
};
window.URL.prototype = {
@weirongxu
weirongxu / test1.asm
Last active May 13, 2019 07:08
test1.asm
; #!/usr/bin/python
; x = 2
; y = 5
; fun = 6*(x-y)*(5*(x+y)-15)/28
; print(hex(fun))
; 设置数据段
DATA SEGMENT
X DB 2 ;变量X
Y DB 5 ;变量Y
@weirongxu
weirongxu / create_precise_xml.py
Last active December 25, 2015 10:38
在ubuntu下生成precise.xml桌面图片切换(Desktop Slideshow)
#!/usr/bin/python
# coding: utf-8
from xml.dom.minidom import Document
import os, glob, random
DOC = Document() #创建DOM文档对象
def createTime(fnode):
'''生成starttime节点'''