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
$ time uniclient -k test1.private.unikey -c simple_root_contract.yml | |
Contract is sealed with 1 key(s) | |
Contract is saved to: simple_root_contract.unicon | |
Sealed contract size: 1417 | |
Sealed contract has no errors | |
Contract is valid | |
real 0m0.619s | |
user 0m0.768s | |
sys 0m0.067s |
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
# | |
# Tools to load ruby sources with require from inside compressed zips. | |
# | |
# [email protected], MIT license. No warranty. | |
# | |
require 'rubygems' | |
require 'zip' | |
alias require_old require |
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
# this code is provided under MIT license terms | |
# [email protected] | |
require 'savon' | |
# | |
# Интерфейс к сервису по РФ: курс одной валюты на заданную дату | |
# возвращает #rate как строку, как число можно получить float_rate, | |
# decimal_rate. | |
# |
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/smtp' | |
# Интерфейс отправки SMS при помощи службы qtelecom.ru. | |
# Требует установки переменных QTELECOM_LOGIN, QTELECOM_PASSWORD. Работает через единственный на | |
# данный момент рабочий из их протоколов (может у меня логин был неполноценный?) - SMTP. | |
# | |
# Thread safe. | |
# | |
# Enjoy ;) [email protected] | |
# |
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 'twilio-ruby' | |
require 'thread' | |
# Simple interface to send long SMS over twilio and test it like | |
# ActionMailer. Requires gem twilio-ruby, and following constants from | |
# your twilio console: SMS_ACCOUNT_SID, SMS_ACCONT_TOKEN,SMS_FROM_NUMBER. | |
# | |
# Thread safe. | |
# | |
# Enjoy ;) [email protected] |
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 'uri' | |
require 'json' | |
require 'hashie' | |
# Simple HTTP access, with embed JSON parsing, pooling and keep-alive support. Especially useful | |
# for API access over https. Requires json support and gem 'hashie'. | |
# | |
# v2 by [email protected] | |
# |
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 net.sergeych.utils; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
/** | |
* Binary to text encoder suitable to use encoded strings as any parts of urls | |
* and parts of file names safely even on case-insensitive systems. Human | |
* friendly, easy to retype from print or from voice, treats confusing |
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
#!/bin/bash | |
# | |
# git pull && run migratoins if need | |
dbtime=`stat -f "%m" db/migrate` | |
schema=`stat -f "%m" db/schema.rb` | |
git pull || exit | |
# If either schema or migrate dir has been changed, run migrations and test db prepare |
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 python | |
# -*- coding: utf-8 -*- | |
# | |
# Build and Launch iPhone Application in Simulator or install | |
# the application on the device via iTunes | |
# | |
import os, sys, uuid, subprocess, shutil, signal, string, traceback, imp | |
import platform, time, re, run, glob, codecs, hashlib, datetime, plistlib | |
from compiler import Compiler |
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 Timer(millis, callback, _params) { | |
var params = $.extend({repeat: false,context: this},_params) | |
this.interval = millis; | |
this.repeat = params.repeat; | |
this.context = params.context; | |
this.args = params.args; | |
this.onTimer = callback; | |
this.callback = $.proxy(this._onTimer, this); | |
this.single = false; | |
this._reqs = 0; |
NewerOlder