🏄♂️
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 Link < ActiveRecord::Base | |
include ActiveModel::Validations | |
validates_with VideoValidator | |
validates_presence_of :tags, :length => { :minimum => 3 } | |
def youtube_embed(youtube_url) | |
if youtube_url[/yout\.be\/([^\?]*)/] | |
youtube_id = $1 | |
else |
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
= render :partial => 'shared/carousel', :locals => { :id => 'models-carousel', :type=> 'hero', :arrows => true, :carousel_items => @carousel_items } | |
#model-hashtag.hashtag | |
#model-filter | |
#savemodel | |
#model-post-count | |
0 | |
#refresh | |
= link_to 'refresh', '/models/random-refresh?model_id='+@selected_model.id.to_s, remote: true | |
%br |
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
// cookie assign for converting visits to users | |
function signup_cookie(){ | |
signinClick(); | |
$(document).ready(function(){ | |
if( $(window).width() > 400 ){ | |
if((!$.cookie('signup') && (location.pathname.indexOf('adventures') == 1 || location.pathname.indexOf('blog') == 1) )){ |
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
# adventure controller | |
class AdventuresController < ApplicationController | |
include ApplicationHelper | |
def index | |
if params[:region] | |
region = params[:region] | |
filter_index('region'.to_sym,region) |
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
/* Can compare deploying a smart contract to tightly versioning an API. | |
Once a smart contract is distrubted & added to ETH it can never be removed. | |
Updates to a smart contract, require a re-deployment. | |
*/ | |
pragma solidity ^ 0.4 .19; | |
contract FaceBlock { | |
// We declare high level variables & types used throughout contract | |
mapping(address => uint256) private addressToIndex; |
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
{ | |
"_type":"export", | |
"__export_format":4, | |
"__export_date":"2020-02-03T22:17:29.587Z", | |
"__export_source":"insomnia.desktop.app:v7.0.6", | |
"resources":[ | |
{ | |
"_id":"req_1a56b9b120a94264b79018d1ecee95f3", | |
"authentication":{ | |
"accessTokenUrl":"https://identity.xero.com/connect/token", |
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
base_params = "oauth_consumer_key=#{CONSUMER_KEY}" + | |
"&oauth_nonce=#{NONCE}" + | |
"&oauth_signature_method=#{SIGNATURE_METHOD}" + | |
"&oauth_timestamp=#{TIMESTAMP}" + | |
"&oauth_token=#{TOKEN}" + | |
"&oauth_version=1.0" + | |
"&tenantType=ORGANISATION" |
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 'uri' | |
require 'base64' | |
require 'openssl' | |
require 'digest/sha1' | |
signing_key = File.read('./privatekey.pem') | |
rsa_key = OpenSSL::PKey::RSA.new signing_key | |
digest = OpenSSL::Digest::SHA1.new | |
signature = rsa_key.sign(digest, signature_base_string) |
OlderNewer