Skip to content

Instantly share code, notes, and snippets.

var iceServers = [];
iceServers[{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
@StasKoval
StasKoval / routes
Created December 20, 2014 16:39
routes
Prefix Verb URI Pattern Controller#Action
api_users GET /api/users(.:format) api/users#index {:format=>:json}
POST /api/users(.:format) api/users#create {:format=>:json}
new_api_user GET /api/users/new(.:format) api/users#new {:format=>:json}
edit_api_user GET /api/users/:id/edit(.:format) api/users#edit {:format=>:json}
api_user GET /api/users/:id(.:format) api/users#show {:format=>:json}
PATCH /api/users/:id(.:format) api/users#update {:format=>:json}
PUT /api/users/:id(.:format) api/users#update {:format=>:json}
DELETE /api/users/:id(.:format) api/users#destroy {:format=>:json}
api_interviews GET /api/interviews(.:format) api/interviews#index {:format=>:json}
class User < ActiveRecord::Base
has_secure_password validations: false
validates_uniqueness_of :email, allow_blank: false
#validates :email, :email => true
after_validation :ensure_token
before_create :set_temporary_password
@import "bootstrap";
@import "angular-growl.min";
@import "ng-modal";
@import "webrtc";
@import "style";
@import "media";
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
angular.module('resumeo').config(['$stateProvider','$urlRouterProvider',
function($stateProvider, $urlRouterProvider){
$urlRouterProvider
.otherwise("/");
$stateProvider
.state("default", {
abstract: true,
# Run external command and abort on failure
def shell(*cmd)
return if cmd.empty?
prog = cmd.first.to_s.split.first
abort "#{prog}: command not found" if `which #{prog}`.empty?
system *cmd
abort "#{prog}: interrupted, signal #{$?.termsig}" if $?.signaled?
abort "#{prog}: execution failed, exit code #{$?.exitstatus}" unless $?.success?
end
require "#{Rails.root}/app/helpers/application_helper"
namespace :bittrix do
include ApplicationHelper
require 'open-uri'
require "net/http"
require "net/https"
require 'json'
desc "TODO"
task load_currencies: :environment do
2014-09-09 12:11:59 proof-of-work found
hash: 0006275a66f68afce92f1bab40bf1d8f017cb0dd7ff90938b9513f19e09e7891
target: 003fffff00000000000000000000000000000000000000000000000000000000
2014-09-09 12:11:59 CBlock(hash=1762deeb93bfefe1b74b38d13a76009f1fca4242856870d5b44acaddde35208f, input=020000007932a1c628ceca53850769d9816c76421e046a
a59f0f25365f7030ca99a4ab82dd303c56e6abd3e6f3955687c70dfa369c3442c79a477064be3095c95faaac008bee0e54ffff3f1f9e000000, PoW=0006275a66f68afce92f1bab40bf1d
8f017cb0dd7ff90938b9513f19e09e7891, ver=2, hashPrevBlock=82aba499ca30705f36250f9fa56a041e42766c81d969078553cace28c6a13279, hashMerkleRoot=00acaa5fc995
30be6470479ac742349c36fa0dc7875695f3e6d3abe6563c30dd, nTime=1410264715, nBits=1f3fffff, nNonce=158, vtx=1)
2014-09-09 12:11:59 CTransaction(hash=00acaa5fc99530be6470479ac742349c36fa0dc7875695f3e6d3abe6563c30dd, ver=1, vin.size=1, vout.size=1, nLockTime=0)
CTxIn(COutPoint(0000000000000000000000000000000000000000000000000000000000000000, 4294967295), coinbase 5b0102062f50325
@justice = Justice.all
Item.delete_all
@justice.each do |j|
#Item.where("date < date(?)", 1.days.ago).where(:justice_id=>j.id).destroy_all
begin
params = {'q_court_id' => j[:q_court_id] }
x = Net::HTTP.post_form(URI.parse(j[:url]), params)
result = JSON.parse(x.body)
rescue => e
puts "error = #{e.message}"