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
REM https://github.com/ruby-china/rubygems-mirror/wiki | |
REM Download cacert.pem here -> http://curl.haxx.se/ca/cacert.pem | |
setx SSL_CERT_FILE D:\Local\Ruby\lib\cacert.pem | |
call gem update --system | |
call gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/ | |
call gem install bundler | |
call bundle config mirror.https://rubygems.org https://gems.ruby-china.org |
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
Windows Registry Editor Version 5.00 | |
; Sublime Text | |
[HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text] | |
"Icon"="D:\\Local\\Sublime Text 3\\sublime_text.exe, 0" | |
[HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text\command] | |
@="D:\\Local\\Sublime Text 3\\sublime_text.exe \"%1\"" | |
; BaiduYun | |
[-HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\YunShellExt] |
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
@api_cache = {} | |
def api_cache id:, threshold:, due:, &blk | |
@api_cache[id] ||= { cache: {} } | |
due_time = case due | |
when Numeric then Time.now + due | |
when Time then due | |
end | |
proc do |*args| # args is the key | |
@api_cache[id][:cache].delete_if { |_key, item| item[:due] < Time.now } | |
unless @api_cache[id][:cache][args] |
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
@echo off | |
pushd "%~dp0" | |
cd .. | |
if "%*" == "" ( | |
tasklist /fi "ImageName eq nginx.exe" |find "nginx.exe" >nul | |
if errorlevel 1 ( | |
start /b nginx.exe | |
) else ( | |
echo nginx.exe is already running. Nothing todoy. | |
) |
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
@set src=1px | |
@echo off | |
call stylus -o dist %src%.styl | |
copy /v /y %src%.styl %src%.min.styl >nul | |
call stylus -c -o dist %src%.min.styl | |
del %src%.min.styl |
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
@echo off | |
if "%~1" == "" goto no_param | |
:main | |
call erb filename="%~1" %~dp0\prmd.tt > "%TEMP%\%~n1.html" | |
start "" "%TEMP%\%~n1.html" | |
goto :EOF | |
:no_param | |
echo Please specify a *.md file. |
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
[Rainmeter] | |
Update=1000 | |
[Metadata] | |
Name=MeasureNetInOut | |
Author=hyrious | |
Information=Just Another Disturbing Thing on my Desktop | |
License=WTFPLv2 | |
Version=0.01 | |
[Variables] | |
Interface=Best |
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
@echo off | |
setlocal EnableDelayedExpansion | |
if "%*" == "" ( | |
echo Nothing todoy. ^(^^_^^^) | |
) else if "%*" == "list" ( | |
call tasklist /fi "ImageName eq php-cgi.exe" | |
) else if "%*" == "stop" ( | |
<nul set /p=Killing php-cgi.exe..^ | |
call taskkill /f /im php-cgi.exe >nul 2>&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
@echo off | |
setlocal EnableDelayedExpansion | |
set T=%1 | |
rem Preprocessing params | |
set cmdline= | |
shift | |
:pp_loop | |
if "%1" == "" goto :pp_next | |
set cmdline=%cmdline% %~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
@echo off | |
setlocal | |
if exist desktop.ini ( attrib +A -S -H desktop.ini ) | |
>desktop.ini echo [.ShellClassInfo] | |
>>desktop.ini echo LocalizedResourceName=%~1 | |
>>desktop.ini echo IconResource= | |
>>desktop.ini echo InfoTip=%~2 |
OlderNewer