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
// ==UserScript== | |
// @name lepra.newcomments | |
// @namespace http://leprosorium.ru | |
// @include http://leprosorium.ru/comments/* | |
// @include http://*.leprosorium.ru/comments/* | |
// @include http://leprosorium.ru/my/inbox/* | |
// ==/UserScript== | |
(function() { |
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
package ru.barbuza { | |
import flash.external.ExternalInterface; | |
public class Logger { | |
public static const DEBUG:Number = 5; | |
public static const INFO:Number = 4; | |
public static const WARNING:Number = 3; | |
public static const ERROR:Number = 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
package { | |
import flash.display.StageScaleMode; | |
import flash.display.StageAlign; | |
import mx.logging.Log; | |
import mx.logging.LogEventLevel; | |
import org.casalib.display.CasaMovieClip; |
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 'optparse' | |
require 'URI' | |
require 'Time' | |
require 'eventmachine' | |
@fails = 0 | |
@requests = 0 | |
@request_timings = [] |
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
function remote-trailing-whitespaces { | |
read -n 1 -e -p 'are you sure? [y/n] ' answ | |
if [[ $answ == y ]]; then | |
echo removing trailing whitespaces from | |
find . -iname "$1" -type f | |
find . -iname "$1" -type f -print0 | xargs -0 sed -i .bak -E "s/[[:space:]]*$//" | |
fi | |
} |
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 'net/http' | |
require 'cgi' | |
require 'uri' | |
require 'md5' | |
require 'json' | |
module Mailru | |
API_METHODS = ['friends.get', 'friends.getAppUsers', 'users.getInfo', | |
'users.isAppUser', 'users.hasAppPermission', 'payments.openDialog', |
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.implement({ | |
show: function() { | |
this.setStyle("visibility", "visible"); | |
}, | |
hide: function() { | |
this.setStyle("visibility", "hidden"); | |
} | |
}); |
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
# -*- coding: utf-8 -*- | |
from django.db import models | |
from django.core import exceptions | |
__all__ = ("BitOptionsField", ) | |
class BitOptionsField(models.Field): |
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
# -*- coding: utf-8 -*- | |
import functools | |
import inspect | |
""" | |
Contract is tiny library for data validation | |
It provides several primitives to validate complex data structures | |
Look at doctests for usage examples | |
""" |
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 seasonNumPattern to "\\d\\d" | |
set episodeNumPattern to "\\d\\d" | |
tell application "iTunes" | |
repeat with I from 1 to count tracks of user playlist "show" | |
set track_ to track I of user playlist "show" | |
set name_ to name of track_ | |
set seasonNum to (find text "(?<=S)(" & seasonNumPattern & ")" in name_ with regexp and string result) as integer | |
set episodeNum to (find text "(?<=E)(" & episodeNumPattern & ")" in name_ with regexp and string result) as integer |
OlderNewer