This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.pyc | |
*.png | |
*.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<script> | |
function createMenu() { | |
chrome.contextMenus.create({ | |
title: "Open &Frame in New Tab", | |
onclick: function(info, tab) { | |
chrome.tabs.create({ | |
url: info.frameUrl || info.pageUrl, | |
index: tab.index + 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 将 TexturePacker 导出的 json 格式 atlas 拆分 | |
*/ | |
function spliter($filename) { | |
$assetFolder = __DIR__; | |
$destFolder = $assetFolder; | |
$frames = json_decode(file_get_contents($assetFolder ."/$filename.txt"), true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* StrBuf: A javascript string buffer class | |
* @author uedsky (http://uedsky.com) | |
* Last Modified: Dec 17, 2011 | |
*/ | |
/** | |
* @class String concat | |
* @return {StrBuf/String} | |
* @constructor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
# https://github.com/seb-m/pyinotify | |
from pyinotify import WatchManager, Notifier, ProcessEvent, IN_CREATE, IN_MODIFY, IN_DELETE | |
import os, sys | |
class FileHandler(ProcessEvent): | |
def process_IN_CREATE(self, event): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=2.0" /> | |
<title>Cross-Browser Grayscale with CSS</title> | |
<link rel="stylesheet" href="gray.css" /> | |
<style> | |
body { text-align: center; } | |
p { color: #f00; font-size: 2em; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Pounding heart animation */ | |
@keyframes pound { | |
to { transform: scale(1.4); } | |
} | |
.heart { | |
display: inline-block; | |
font-size: 150px; | |
color: #e00; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Links | |
*/ | |
body { | |
background: #FFDEDB; | |
} | |
a { | |
display: inline-block; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array | |
/* | |
* Implemented in JavaScript 1.6 | |
*/ | |
Array.prototype.forEach = Array.prototype.forEach || function(fun /*, thisp*/) { | |
var len = this.length >>> 0; | |
if(typeof fun != 'function') { throw new TypeError(fun + ' is not a function'); } | |
for(var thisp = arguments[1], i = 0; i < len; i++) { | |
if(i in this) { |
NewerOlder