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
.element { | |
position: relative; | |
top: 50%; | |
transform: perspective(1px) translateY(-50%); | |
} |
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
Vue.directive('background-image',{ | |
update: function(url) { | |
var el = $(this.el); | |
el.css('transition','opacity 0.5s ease-in').css('opacity',0); | |
var img = $('<img>', { | |
src: url | |
}).hide().on('load',function() { | |
$(this).remove(); | |
el.css('background-image', 'url("'+url+'")').css('opacity',1); | |
}).appendTo(el); |
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 python3 | |
# -*- coding: utf-8 -*- | |
''' | |
Configuration | |
Usage: | |
from config import configs | |
''' |
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
def copydir(src,dst): | |
if not os.path.exists(dst): | |
os.mkdir(dst) | |
for f in os.listdir(src): | |
path = pjoin(src,f) | |
if os.path.isfile(path): | |
dst_path = os.path.join(dst,f) | |
# if the files modify time is the same, do not copy | |
if not os.path.exists(dst_path) or os.path.getmtime(path) != os.path.getmtime(dst_path): | |
# use 'copy2' to keep file metadate |
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
i = keys.length | |
while (i--) { | |
// do something | |
} |
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
.element:before{ | |
content: ""; | |
display: block; | |
padding-top: 100%; /* Make height same as width */ | |
} |
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
import codecs | |
import csscompressor | |
import jsmin | |
import htmlmin | |
def js_minify(src,dst): | |
with codecs.open(src, 'r', 'utf-8') as src_file: | |
minified = jsmin.jsmin(src_file.read()) | |
with codecs.open(dst, 'w', 'utf-8') as dst_file: | |
dst_file.write(minified) |
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
/*jshint unused:false */ | |
(function (exports) { | |
'use strict'; | |
var STORAGE_KEY = 'data'; | |
exports.localStorage = { | |
fetch: function () { | |
return JSON.parse(localStorage.getItem(STORAGE_KEY) || '[]'); | |
}, | |
save: function (data) { | |
localStorage.setItem(STORAGE_KEY, JSON.stringify(data)); |
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
根据Unicode5.0整理如下: | |
1)标准CJK文字 | |
http://www.unicode.org/Public/UNIDATA/Unihan.html | |
2)全角ASCII、全角中英文标点、半宽片假名、半宽平假名、半宽韩文字母:FF00-FFEF | |
http://www.unicode.org/charts/PDF/UFF00.pdf | |
3)CJK部首补充:2E80-2EFF | |
http://www.unicode.org/charts/PDF/U2E80.pdf |
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
@title Remove Steam Uninstall Links From Windows | |
@net session >nul 2>&1 | |
@if %errorlevel% == 0 ( | |
@for /F "delims=" %%a in ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall ^| findstr /C:"Steam App"') do @reg delete "%%a" /f | |
@for /F "delims=" %%a in ('reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall ^| findstr /C:"Steam App"') do @reg delete "%%a" /f | |
@echo Success! | |
@pause>nul | |
) else ( | |
@echo You do not have Administrator Priveleges. Try right clicking and choosing 'run as administrator ' | |
@pause>nul |
OlderNewer