Skip to content

Instantly share code, notes, and snippets.

View JohnProg's full-sized avatar
🎯
Focusing

John Paul JohnProg

🎯
Focusing
  • Lima, Perú
View GitHub Profile
@JohnProg
JohnProg / androidDevAliases.sh
Created March 30, 2025 23:59 — forked from nisrulz/androidDevAliases.sh
All of my android development aliases.
# I use ZSH, here is what I added to my .zshrc file (config file)
# at ~/.zshrc
# ------------------ Android ------------------ #
# Have the adb accessible, by including it in the PATH
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:path/to/android_sdk/platform-tools/"
# Setup your Android SDK path in ANDROID_HOME variable
export ANDROID_HOME=~/sdks/android_sdk
@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/[email protected]/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/[email protected]/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)";