Skip to content

Instantly share code, notes, and snippets.

View Gaubee's full-sized avatar
🫐
Growing

Gaubee Gaubee

🫐
Growing
View GitHub Profile
@Gaubee
Gaubee / myEditor.java
Last active December 18, 2015 13:29
简单的文本编辑器。 知识点:菜单栏、快捷键、文件流、剪切板
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.datatransfer.*;
import java.io.*;
public class myEditor extends JFrame {
String filename;
JTextArea tx;
Clipboard clip = getToolkit().getSystemClipboard();
myEditor() {
#!/bin/bash
#script extraido de: http://paulocassiano.wordpress.com/2008/08/29/deixando-o-gedit-com-a-cara-do-textmate/
#tip for better "resolution" here: http://blog.siverti.com.br/2008/05/22/fonte-monaco-no-ubuntugedit/
cd /usr/share/fonts/truetype/
#TODO: put validation if folder already exists
sudo mkdir ttf-monaco
@Gaubee
Gaubee / 正则
Last active December 19, 2015 01:39
转换《Think in Java》成markdown格式时遇到的正则
([0-9])[ ]+\.[ ]+([0-9])
$1\.$2
[①-⑳]
[
{
"spec name": "CSS Animations",
"uri": "http://www.w3.org/TR/css3-animations",
"category": "css-property",
"Name": "animation-name",
"Value": "<single-animation-name> [\n ‘,’ <single-animation-name> ]*",
"Initial": "‘none’",
"Applies To": "all elements, ::before and ::after pseudo-elements",
"Inherited": "no",
@Gaubee
Gaubee / 发展鬼懿群的建议.md
Created July 6, 2013 16:33
关于鬼懿IT-成长群

Gaubeegaubee@126.com 23:42:43

@管理员
需要一份群规。

还有,问问题 的话,我觉得现在国内git-osc这个git平台就不错,上面的issue就是一个十分优秀的问答平台,和Github一样,贴代码什么的高亮也方便。访问速度快。 搜索、上标签等等功能一应俱全,干嘛非要用QQ这种及时通讯来讨论低质量的话题。 时效性是QQ的优势,但难免失去了发问的质量与回答的方式,经常很多问题同时在群上提出。 也因为QQ的特性,很多优秀的问题在设备上不同步、不方便查找导致一直在重复的发问。 QQ可以作为一个召集的平台,但不应该是发问与回答的平台。

@Gaubee
Gaubee / WebKit-Style.js
Last active December 19, 2015 17:49
write all element's style in the prototye of style. 将元素所有的样式写到style中,方便单文件复制。 mhtml的保存并不完整。
(function (G) {
function simpleDOM(tagName){
var dom = document.createElement(tagName);
document.body.appendChild(dom);
return dom;
}
function getDifStyle(el){
var baseDOM = simpleDOM(el.tagName);
var elStyle = getComputedStyle(el);
var baseDOMStyle = getComputedStyle(baseDOM);
@Gaubee
Gaubee / index.html
Last active December 20, 2015 14:59
nodejs远程命令行系统
<html>
<head>
<title>hehe</title>
<meta content="The Shell command runner Based on Nodejs">
<style>
/**
* basic styles for the javascript sandbox console - joss crowcroft
*
* http://josscrowcroft.github.com/javascript-sandbox-console/
*/
@Gaubee
Gaubee / firebug-lite.md
Last active December 21, 2015 04:09
firebug-lite搭建在本地,供虚拟机上的IE调试用

firebug-lite下载地址https://getfirebug.com/releases/lite/latest/firebug-lite.tar.tgz

下载完后直接搭建在本地80端口上,我的80端口是php服务器,支持文件夹路由,所以直接把压缩包解压到www文件夹下

IE6~8都是在虚拟机中调试,要连接Ubuntu上的端口不能用localhost,需要先获取本地IP地址:

$ ifconfig

找到wlan0的ip,比如说是: 192.168.0.109 。所以在虚拟机中的访问地址是 localtion.hastname + location.port + $fire_path

@Gaubee
Gaubee / host
Last active December 22, 2015 23:19
Hosts
#UPDATE:2013-12-07 12:16
127.0.0.1 localhost
#SmartHosts START
#Google Services START
203.208.46.200 0.docs.google.com
203.208.46.200 0.drive.google.com
203.208.46.200 1.docs.google.com
@Gaubee
Gaubee / qzone.java
Created September 27, 2013 14:02
Java 抓取Qzone的说说数据的实例
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;