Skip to content

Instantly share code, notes, and snippets.

Avatar

Juliana Lucena julianalucena

  • Incognia
  • Recife, Pernambuco, Brazil
View GitHub Profile
View response.json
{
"evidence": {
"account_integrity": {...},
"addresses": [...],
"device_behavior_reputation": "allowed",
"device_fraud_reputation": "allowed",
"device_integrity": {
"emulator": false,
"from_official_store": true,
"gps_spoofing": false,
View api.rb
require 'faraday'
require 'json'
module Incognia
class Api
include Singleton
API_HOST = 'https://api.us.incognia.com/api/'.freeze
def register_login(installation_id:, account_id:)
@julianalucena
julianalucena / login_form.rb
Last active Jun 26, 2021 — forked from nataliaconde/login_form.rb
authentication logic
View login_form.rb
# login_form.rb
class LoginForm < BaseForm
attr_accessor :email, :password, :incognia_installation_id
validates :email, :password, presence: true
validate :device_risk
# Other validations...
def submit
return nil if invalid?
View sessions_controller.rb
# sessions_controller.rb
class SessionsController < ApplicationController
def create
@login_form = LoginForm.new(params)
if @user = @login_form.submit
sign_in @user
redirect_to @user, notice: "Welcome!"
else
render action: :new
View index.html
<!doctype html>
<html>
<head>
<title>Webpack CSS example</title>
</head>
<body>
<div id="main"></div>
<script src="js/output.js"></script>
</body>
</html>
View gist:2fd1db48e48eb84265bd
[11:06:24] [create] index.703e13ff.html
[11:06:24] gulp-cloudfront: Identified index [ /index.703e13ff.html ]
[11:06:25] { [TimeoutError: Missing credentials in config]
plugin: 'gulp-cloudfront',
showStack: false,
name: 'TimeoutError',
message: 'Missing credentials in config',
stack: 'TimeoutError: Missing credentials in config\n at ClientRequest.<anonymous> (/Users/julianalucena/dev/work/review-pof.js/node_modules/gulp-cloudfront/node_modules/aws-sdk/lib/http/node.js:55:34)\n at ClientRequest.g (events.js:199:16)\n at ClientRequest.emit (events.js:104:17)\n at Socket.emitTimeout (_http_client.js:543:10)\n at Socket.g (events.js:199:16)\n at Socket.emit (events.js:104:17)\n at Socket._onTimeout (net.js:348:8)\n at _makeTimerTimeout (timers.js:476:11)\n at Timer.unrefTimeout (timers.js:540:5)\n' }
[11:06:25] [create] widget.afae0418.js
[
@julianalucena
julianalucena / backbone-carousel.html
Created Oct 8, 2015 — forked from jjulian/backbone-carousel.html
A simple carousel implemented with a single Backbone view
View backbone-carousel.html
View gist:504c39df0bd2ef37bace
trustvox (master) > ping -c 20 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=43 time=154.882 ms
Request timeout for icmp_seq 1
64 bytes from 8.8.8.8: icmp_seq=2 ttl=43 time=224.227 ms
Request timeout for icmp_seq 3
64 bytes from 8.8.8.8: icmp_seq=4 ttl=43 time=133.920 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=43 time=233.549 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=43 time=177.096 ms
Request timeout for icmp_seq 7
View gist:99535a9bc80886d8ab09
$ ping -c 20 172.16.254.254
PING 172.16.254.254 (172.16.254.254): 56 data bytes
64 bytes from 172.16.254.254: icmp_seq=0 ttl=64 time=1.146 ms
64 bytes from 172.16.254.254: icmp_seq=1 ttl=64 time=7.235 ms
64 bytes from 172.16.254.254: icmp_seq=2 ttl=64 time=3.939 ms
64 bytes from 172.16.254.254: icmp_seq=3 ttl=64 time=0.998 ms
64 bytes from 172.16.254.254: icmp_seq=4 ttl=64 time=0.890 ms
64 bytes from 172.16.254.254: icmp_seq=5 ttl=64 time=1.170 ms
64 bytes from 172.16.254.254: icmp_seq=6 ttl=64 time=0.909 ms
64 bytes from 172.16.254.254: icmp_seq=7 ttl=64 time=3.186 ms
View scroll-effect.html
<div class="box scrollme animateme" data-when="view" data-from="0.01" data-to="0.7" data-scale="3" data-translatex="0" data-translatey="100"></div>
<div class="image scrollme animateme" data-when="enter" data-from="0" data-to="0.6" data-crop="false" data-opacity="0" data-scale="0.5" data-translatey="-100" ></div>