Skip to content

Instantly share code, notes, and snippets.

View JohnProg's full-sized avatar
🏠
Working from home

John Paul JohnProg

🏠
Working from home
  • Lima, Perú
View GitHub Profile
@JohnProg
JohnProg / index.html
Created March 31, 2021 19:34 — forked from deanrad/index.html
JS BinOboeJS incremental loading// source https://jsbin.com/riyolox
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="OboeJS incremental loading">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://unpkg.com/oboe@2.1.4/dist/oboe-browser.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.js"></script>
</head>
package com.haerul.androidregisterandlogin;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import java.util.HashMap;
public class SessionManager {
@JohnProg
JohnProg / OkHttpUtil.java
Created March 10, 2018 22:34 — forked from preethamhegdes/OkHttpUtil.java
OkHttp Client Ignore certificate
import okhttp3.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.net.ssl.*;
import java.net.*;
import java.security.cert.CertificateException;
/*
okhttp version used 3.8.1
@JohnProg
JohnProg / TabParallax.js
Created February 4, 2018 13:15 — forked from andigu/TabParallax.js
A react native component featuring parallax scrolling with tabs
import React, {Component} from "react";
import {Animated, Dimensions, Platform, Text, TouchableOpacity, View} from "react-native";
import {Body, Header, List, ListItem as Item, ScrollableTab, Tab, TabHeading, Tabs, Title} from "native-base";
import LinearGradient from "react-native-linear-gradient";
const {width: SCREEN_WIDTH} = Dimensions.get("window");
const IMAGE_HEIGHT = 250;
const HEADER_HEIGHT = Platform.OS === "ios" ? 64 : 50;
const SCROLL_HEIGHT = IMAGE_HEIGHT - HEADER_HEIGHT;
const THEME_COLOR = "rgba(85,186,255, 1)";
package main
import (
"fmt"
"net/http"
)
const (
//user_is_authenticated = false
user_is_authenticated = true
@JohnProg
JohnProg / jwt-example.go
Created December 30, 2016 17:18
JsonWebTokens Example with generated key.
/* rewritten example of JsonWebToken example
* from https://gist.github.com/thealexcons/4ecc09d50e6b9b3ff4e2408e910beb22
* Keys are generated and packed to PEM-format at server start
* Plus some fixes and refactors
*
* My respect to thealexcons
*/
package main
import (
package main
import (
"io/ioutil"
"log"
"strings"
"net/http"
"encoding/json"
"fmt"
"time"
@JohnProg
JohnProg / Appfile
Created November 8, 2016 20:51 — forked from mmazzarolo/Appfile
Simple Fastlane setup for React-Native (Android - iOS)
# iOS
app_identifier "com.myapp.app" # The bundle identifier of your app
apple_id "me@gmail.com" # Your Apple email address
team_id "1234ABCD" # Developer Portal Team ID
# Android
json_key_file "./google-play-api-secret.json" # Path to the json secret file - Follow https://github.com/fastlane/supply#setup to get one
package_name "com.myapp.app" # Your Android app package
@JohnProg
JohnProg / multiple-3rd-party-widgets.js
Created April 30, 2016 02:18 — forked from zenorocha/multiple-3rd-party-widgets.js
Loading multiple 3rd party widgets asynchronously
(function() {
var script,
scripts = document.getElementsByTagName('script')[0];
function load(url) {
script = document.createElement('script');
script.async = true;
script.src = url;
scripts.parentNode.insertBefore(script, scripts);
/**
* Created by gaspar on 22/sept/15.
*/
//angularJS
(function () {
var app = angular.module('app',
//ejemplo de algun controlador
['app.mainController']
);