This file contains hidden or 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
secret = Digest::SHA1.hexdigest("yourpass") | |
a = ActiveSupport::MessageEncryptor.new(secret) | |
b = a.encrypt("eh") | |
c = ActiveSupport::MessageEncryptor.new(secret) | |
c.decrypt(b) |
This file contains hidden or 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 async_init() { | |
var element, type, src; | |
var parent = document.getElementsByTagName('body'); | |
var cdn = new Array; | |
cdn[0] = '//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js'; | |
for (var i in cdn) { | |
element = document.createElement('script'); |
This file contains hidden or 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 async_init() { | |
var element, type, src; | |
var parent = document.getElementsByTagName('body'); | |
var cdn = new Array; | |
cdn[0] = '//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js'; | |
for (var i in cdn) { | |
element = document.createElement('script'); |
This file contains hidden or 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 'bundler/gem_tasks' | |
require 'jasmine' | |
require 'coffee-script' | |
require 'fileutils' | |
load 'jasmine/tasks/jasmine.rake' | |
task 'test' do | |
pattern = '{**/*.rb,**/*.slim,**/*.coffee}' |
This file contains hidden or 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
window.sleep = (ms, and_runs) -> | |
flag = false | |
runs -> | |
setTimeout -> | |
flag = true | |
, ms | |
waitsFor -> | |
flag |
This file contains hidden or 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 'bundler/setup' | |
require 'coffee-script' | |
require 'sass' | |
require 'fileutils' | |
require 'execjs' | |
require 'multi_json' | |
support_pattern = '{**/*.serenade,**/*.coffee,**/*.sass}' |
This file contains hidden or 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
class Object | |
def blank? | |
self.nil? | |
end | |
def present? | |
!blank? | |
end | |
end |
This file contains hidden or 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 <iostream> | |
#include <conio.h> // В этой библиотеке "живет" - getch(); | |
/* | |
Исходные данные | |
--------------- | |
Сумма вклада | |
Срок вклада, в месяцах | |
*/ |
This file contains hidden or 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 <iostream> | |
#include <conio.h> | |
using namespace std; | |
int main() | |
{ | |
int period, interest; | |
float interest_in_period, amount, income; |