Skip to content

Instantly share code, notes, and snippets.

View neekey's full-sized avatar
🎯
Focusing

Neekey neekey

🎯
Focusing
View GitHub Profile
@mixin animation($value) {
-webkit-animation: unquote($value);
-moz-animation: unquote($value);
-o-animation: unquote($value);
animation: unquote($value);
}
@mixin animation-property($property, $value) {
-webkit-animation-#{$property}: unquote($value);
-moz-animation-#{$property}: unquote($value);
@neekey
neekey / background.html
Last active August 29, 2015 14:01
在chrome插件中实现复制文本内容
<!doctype html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<textarea class="J_ForCopy"></textarea>
<script type="text/javascript" src="./lib/jquery.js"></script>
var http = require('http'),
httpProxy = require('http-proxy');
// Create an instance of node-http-proxy
var proxy = new httpProxy.HttpProxy({
target: {
host: 'localhost',
port: 9001
}
});
@neekey
neekey / getGitInfo.js
Created August 27, 2014 02:21
获取当前git仓库信息
function getRepoInfo(){
var gitPath = PATH.resolve( process.cwd(), '.git' );
console.log( gitPath );
if( FS.existsSync( gitPath ) ){
var HEAD = FS.readFileSync( PATH.resolve( gitPath, 'HEAD' )).toString();
var CONFIG = FS.readFileSync( PATH.resolve( gitPath, 'config' )).toString();
var result = {};
@neekey
neekey / async-to-q.js
Last active August 29, 2015 14:16 — forked from wavded/async-to-q.js
var fs = require('fs')
var Q = require('q')
var fs_stat = Q.denodeify(fs.stat)
var fs_readdir = Q.denodeify(fs.readdir)
var files = [
'./fixtures/file1',
'./fixtures/file2',
'./fixtures/file3',
'./fixtures/file4'
@neekey
neekey / cacheTest
Created April 14, 2012 06:36
browser cache test
var http = require("http");
var fs = require("fs");
var url = require("url");
var path = require("path");
var transferFile = function (request, response) {
var uri = url.parse(request.url).pathname;
var filepath = path.join(process.cwd(), uri);
path.exists(filepath, function (exists) {
@neekey
neekey / YUICompressor.sh
Created April 20, 2012 05:50
YUI Compressor Shell
#!/bin/sh
# YUI compressor shell 简单脚本
# params:
# -f 需要压缩的文件名
# -o 输出文件名
# -c 压缩编码
# 使用说明:
# 在~/.profile 中为本脚本的执行添加一个别名比如:
# alias yui="/users/neekey/yuicompressor.sh"
# 然后进入需要压缩文件的目录:
@neekey
neekey / mongoose.find.example.js
Created April 29, 2012 11:40
mongoose常用的集中find方式
var DB = require( '../../database/' );
var mongoose = require( 'mongoose' );
var Item = mongoose.model( 'item' );
describe( 'mongooseTest', function(){
it( 'localtion test', function(){
var itemsLen = 0;
@neekey
neekey / senchaTouchRouteEnhance.js
Created May 8, 2012 08:12
Sencha Touch 1 路由功能增强
(function(){
var Mods = App.mods;
var DefaultAction = 'index';
Mods.route = (function (){
var Route = {
/**
* 设置hash
@neekey
neekey / acfun.css
Created May 11, 2012 15:29
acfunCss
body{ background-image: url(http://s.acfun.tv/h/Images/Upload/225d3b6b-de84-4d6c-bf67-477d5b9a28e2.jpg)!important; background-repeat: no-repeat!important; background-position: 0px 0px!important; background-attachment: fixed!important; background-size: cover!important; }
#stage{ background-color: rgba(0, 0, 0, 0)!important; }
#header{ height: 128px!important; background: url() 0px 0px repeat-x!important; }
#area-topic{ background-color: rgba(255, 255, 255, 0.5)!important; border-radius: 15px 15px 0px 0px!important; }
#list-topic-third{ width: 280px!important; height: 200px!important; margin-left: 20px!important; border-radius: 4px!important; overflow: hidden!important; background-color: rgba(0, 0, 0, 0)!important; }
#header{ border-bottom: 0px solid #ccc!important; }
#mainer{ border-top: 0px solid #f9f9f9!important; }
#ad-index{ display: none!important; }
.tabbable{ background-color: rgba(0, 0, 0, 0)!important; }
#area-link{ opacity: 0.9!important; }