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>
React native
- [ ] Install adb on mac
brew install android-platform-tools
adb devices
adb start-server
adb kill-server
adb devices
adb reverse tcp:8081 tcp:8081
Firebase
{
"rules": {
"userAddedCars": {
"$uid": {
".read": "$uid == auth.uid",
".write": "$uid == auth.uid || root.child('users').child(auth.uid).child('admin').val() == true"
}
}
}
// build.gradle Module App
apply plugin: "androidx.navigation.safeargs.kotlin"
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"
package com.haerul.androidregisterandlogin;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import java.util.HashMap;
public class SessionManager {
<style>
body {
background-color: yellow;
margin: 0;
}
.header-center {
background-color: red;
max-width: 1200px;
height: 200px;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="https://unpkg.com/babel-standalone@6.26.0/babel.min.js"></script>
@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)";
sudo apt-get install openjdk-7-jre
sudo apt-get install openjdk-7-jdk
java -version
# Download the security key for the Jenkins repository & add it to the keychain
wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
# Add the Jenkins sources to apt
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
# Update the list of packages