Skip to content

Instantly share code, notes, and snippets.

@mosufy
mosufy / vbc-api-post-request-example-2.json
Created March 10, 2015 03:14
VBC API Request a token for mobile app based video verification
$ curl -X POST https://api.verifiedbycam.com/v2/request \
-H "X-App-Key: c9cf97d8c394a861" \
-H "X-Secret-Key: 779de173efee7e3b2e816c164004dd77d6ac1967dc6d0ca128cd5cd7afd77503" \
-H "Content-Type: application/json" \
-d "pin=true" \
-d '{
"uid": 4323499,
"callback": "https://domain.com/request-received",
"caption": "Hi! My name is Finn of Adventure Time!",
"data": {
@mosufy
mosufy / vbc-api-post-request-example-1-response.json
Created March 10, 2015 03:11
VBC API Request a token for web based video verification response
{
"link": "https://api.verifiedbycam.com/delegate?token=13e26bbfc2847f786c7971c",
"token": "13e26bbfc2847f786c7971c"
}
@mosufy
mosufy / vbc-api-post-request-example-1.json
Last active August 29, 2015 14:16
VBC API Request a token for web based video verification
$ curl -X POST https://api.verifiedbycam.com/v2/request \
-H "X-App-Key: c9cf97d8c394a861" \
-H "X-Secret-Key: 779de173efee7e3b2e816c164004dd77d6ac1967dc6d0ca128cd5cd7afd77503" \
-H "Content-Type: application/json" \
-d '{
"uid": 4323499,
"callback": "https://domain.com/request-received",
"caption": "Hi! My name is Finn of Adventure Time!",
"data": {
"email": "foo@bar.test",
@mosufy
mosufy / vbc-api-sample-error-response.json
Last active August 29, 2015 14:16
VBC API Sample Error Response
{
"message": "An unknown error has occured.",
"error_id": "13e09fbdbafb1bbaf619eea53b4f2e97284cf7c0e2510933ddd2ec81a8118eb3"
}
@mosufy
mosufy / vbc-api-sample-response-format.json
Created March 10, 2015 03:01
VBC API Sample Response Format
{
"link": "https://api.verifiedbycam.com/delegate?token=13e26bbfc2847f786c7971c",
"token": "13e26bbfc2847f786c7971c"
}
@mosufy
mosufy / vbc-api-sample-request-format.json
Last active August 29, 2015 14:16
VBC API Sample Request Format
$ curl -G https://api.verifiedbycam.com/v2/requests \
-H "X-App-Key: c9cf97d8c394a861" \
-H "X-Secret-Key: 779de173efee7e3b2e816c164004dd77d6ac1967dc6d0ca128cd5cd7afd77503"
@mosufy
mosufy / app-server-block-nginx-lemp-ssl
Created January 20, 2015 05:43
Application Server Block for NGINX LEMP Stack Configuration with SSL
server {
listen 80;
server_name domain.dev;
# force all requests to connec via HTTPS
return 301 https://domain.dev$request_uri;
}
server {
listen 443 ssl;
@mosufy
mosufy / default-server-block-Nginx-LEMP
Created January 20, 2015 05:40
Default Server Block for NGINX in LEMP Stack Configuration
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.php index.html index.htm;
server_name localhost;
location / {
@mosufy
mosufy / Vagrant-LEMP-ubuntu.sh
Created January 20, 2015 05:38
Vagrant LEMP Stack Installation Bash Script for Ubuntu 14.0.4
#!/usr/bin/env bash
# Variables
APPNAME=appname
DBHOST=localhost
DBNAME=db_app
DBUSER=user1
DBPASSWD=password1
# Update the box
@mosufy
mosufy / git-push-to-deploy.md
Last active August 29, 2015 14:13
Git Push to deploy setup

Setup GIT push-to-deploy

Push to remote repo will automagically update the files.

  1. Set-up bare git on remote

     $ cd /var/www/{appfolder}
     $ sudo mkdir .git
     $ cd .git
    

$ sudo git init --bare