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
{ scopeName = 'text.html.ruby'; | |
fileTypes = ( 'rhtml', 'erb', 'html.erb' ); | |
foldingStartMarker = '(?x) | |
(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b.*?> | |
|<!--(?!.*-->) | |
|\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/))) | |
)'; | |
foldingStopMarker = '(?x) | |
(</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)> | |
|^\s*--> |
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
<form action="<%= @pay_desc['mrh_url'] %>" method="post"> | |
<input type=hidden name=MrchLogin value="<%= @pay_desc['mrh_login'] %>"> | |
<input type=hidden name=OutSum value="<%= @pay_desc['out_summ'] %>"> | |
<input type=hidden name=InvId value="<%= @pay_desc['inv_id'] %>"> | |
<input type=hidden name=Desc value="<%= @pay_desc['inv_desc'] %>"> | |
<input type=hidden name=SignatureValue value="<%= @pay_desc['crc'] %>"> | |
<input type=hidden name=Shp_item value="<%= @pay_desc['shp_item'] %>"> | |
<input type=hidden name=IncCurrLabel value="<%= @pay_desc['in_curr'] %>"> | |
<input type=hidden name=Culture value="<%= @pay_desc['culture'] %>"> | |
<input type=submit value='Оплатить'> |
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
require 'rubygems' | |
require 'id3lib' | |
require 'iconv' | |
def encode (filename) | |
puts "encode #{filename}" | |
tag = ID3Lib::Tag.new(filename) | |
for f in tag | |
if f[:text] | |
f[:text] = Iconv.conv('UTF-16BE','CP1251',f[:text]) |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
int main(void) | |
{ | |
int result; | |
setuid( 0 ); | |
result = system("/bin/bash -c 'kill -HUP `cat /usr/local/var/run/nginx.pid`'"); |
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
{ scopeName = 'source.stylus'; | |
fileTypes = ( 'styl', 'stylus' ); | |
patterns = ( | |
{ name = 'comment.line.stylus'; | |
match = '(?:^[ \t]+)?(\/\/).*$\n?'; | |
captures = { 1 = { name = 'punctuation.definition.comment.stylus'; }; }; | |
}, | |
{ name = 'comment.block.stylus'; | |
begin = '/\*'; | |
end = '\*/'; |
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
brew install flac ffmpeg cuetools # ставим нужные пакеты | |
# скачиваем cuetag.sh скрипт, например отсюда https://github.com/gumayunov/split-cue/blob/master/cuetag | |
ffmpeg -i 1.ape 1.flac # конвертируем во flac, так как libmac для APE не ставится на osx | |
cuebreakpoints 1.cue | shnsplit -o flac 1.flac #нарезаем на треки | |
cuetag 1.cue split-track*.flac #прописываем тэги (cuetag.sh ставится отдельно отдельно) | |
#конвертируем в ALAC | |
for f in split-track*.flac | |
do |
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
curl -u "YOUR_USERNAME" https://api.github.com/user/repos -d '{"name":"MY NEW REPO","description":"REPO DESCRIPTION", "private": false}' |
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
Syntax = | |
AssignmentExpression: 'AssignmentExpression' | |
ArrayExpression: 'ArrayExpression' | |
BlockStatement: 'BlockStatement' | |
BinaryExpression: 'BinaryExpression' | |
BreakStatement: 'BreakStatement' | |
CallExpression: 'CallExpression' | |
CatchClause: 'CatchClause' | |
ConditionalExpression: 'ConditionalExpression' | |
ContinueStatement: 'ContinueStatement' |
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
$.chain = function() { | |
var tasks | |
, args = [] | |
, error = noop; | |
if(arguments.length === 3) { | |
args = $.isArray(arguments[0]) ? arguments[0] : [arguments[0]]; | |
tasks = arguments[1]; | |
error = arguments[2]; | |
} else if(arguments.length === 2) { |
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
DAY = 86400000 | |
getStartOfWeek = (t) -> | |
UTC3_OFFSET = 60*60*3 | |
kDays4Years = [0, 365, 2 * 365, 3 * 365 + 1] | |
kDaysIn4Years = 4 * 365 + 1 | |
kDaysIn100Years = 25 * kDaysIn4Years - 1 | |
kDaysIn400Years = 4 * kDaysIn100Years + 1 | |
kDays1970to2000 = 30 * 365 + 7 | |
kDaysOffset = 1000 * kDaysIn400Years + 5 * kDaysIn400Years - kDays1970to2000 | |
kYearsOffset = 400000 |
OlderNewer