- Execute:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
- Relaunch the Finder
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
for f in *.mp4 | |
ffmpeg -i "$f" -ab 32k -ac 1 -acodec mp3 -vn "${f%.*}.mp3" | |
done |
build = (opt) -> | |
console.log "build!" | |
if task? | |
console.log "task" | |
task "sbuild", -> | |
build() | |
else | |
console.log "exports" | |
exports.build = build |
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 |
$.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) { |
curl -u "YOUR_USERNAME" https://api.github.com/user/repos -d '{"name":"MY NEW REPO","description":"REPO DESCRIPTION", "private": false}' |
{ 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 = '\*/'; |
#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`'"); |
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]) |
{ 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*--> |