Skip to content

Instantly share code, notes, and snippets.

@summivox
summivox / firefox.style.dom.md
Last active December 14, 2015 11:49
renren-markdown vs. firefox style DOM object

其实一般弄前端是用不着直接跟DOM打交道的……

renren-markdown偏偏就需要动态操作CSS,于是就需要操作DOM的style对象…… 问题很快就来了。

1. lowerCamelCase vs. css-case

javascript的习惯:lowerCamelCase为主,UpperCamelCaseFULL_CAPS为辅……
css的习惯:padding-right: 0.5em;

因此用javascript来操作padding-right就应该写作:

@summivox
summivox / prog21.quotes.md
Last active December 14, 2015 11:50
excerpts & thoughts from http://prog21.dadgum.com/ blog entries

http://prog21.dadgum.com/

感觉挺有意思的~

off topic: captcha=NNNB


If you have a small (small!) library or tool that does exactly what you need, that you understand inside and out, then you know if your needs change slightly you can get in there and make adjustments without pacing back and forth for a new release. If you have an epiphany about how to further automate things or how to solve difficult cases you didn't think were possible, then you can code up those improvements. Maybe they don't always work out, but you can at least try the experiments.

@summivox
summivox / traceroute.20130311.log
Created March 11, 2013 02:28
tracert -d 166.111.8.28 tracert -d www.baidu.com tracert -d www.youku.com tracert -d 8.8.8.8 tracert -d kernel.org
时间:2013-3-11 10:26
地点:清华大学紫荆11号楼
本地IP:59.66.192.143
操作系统:Windows8
Tracing route to 166.111.8.28 over a maximum of 30 hops
1 <1 ms <1 ms <1 ms 192.168.11.1
2 <1 ms <1 ms <1 ms 59.66.192.1
3 <1 ms <1 ms <1 ms 118.229.2.161
<?xml version="1.0" encoding="UTF-8"?>
<cdtprojectproperties>
<section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.IncludePaths">
<language name="holder for library settings">
</language>
<language name="Assembly">
<includepath>${KEIL}\ARM\INC</includepath>
<includepath>${KEIL}\ARM\Startup</includepath>
<includepath>${KEIL}\ARM\RV31\INC</includepath>
@summivox
summivox / camd.md
Last active December 15, 2015 15:39
机械设计基础A(3):AutoCAD插件 乱码修复

起因:

机设课老师发了一个叫“CAMD”的AutoCAD插件,但用AutoCAD较新版本的同学可能会遇到这个问题:

wrong

对话框全变成乱码了……

解决方法:

@summivox
summivox / acfun.20130401.html
Created April 1, 2013 03:29
acfun.tv on April Fool, 2013
<html>
<head>
<meta charset="UTF-8">
<title>兵庫北 VS 埼玉</title>
<style type="text/css"></style>
</head>
<body>
<p>A站已被使徒入侵,请耐心等待战争结束!……Thank♂you♂sir!</p>
<p>
若想和猴子签订契约成为战斗力,请移步
@summivox
summivox / golink.bat
Created May 24, 2013 01:00
go1.1 windows binary workaround: gdb can't find go runtime sources due to wrong GOROOT
@summivox
summivox / test.go
Last active December 17, 2015 16:39
package main
var S = "abc"
var I int32 = 10000
func main() {
go print(I)
s := S
print(s)
print(S)
@summivox
summivox / renren-markdown.user.js
Last active August 28, 2016 15:58
renren-markdown v1.0.0 preview (2013-11-06)
// Copyright (c) 2013, smilekzs. (MIT Licensed)
// ==UserScript==
// @name renren-markdown
// @namespace http://github.com/smilekzs
// @version 1.0.0
// @description Powerful markdown-based editor for blog.renren.com
// @grant GM_xmlhttpRequest
// @match *://blog.renren.com/blog/*Blog*
// @match *://blog.renren.com/blog/*edit*
// @match *://blog.renren.com/*Entry*