This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {useEffect, useRef} from 'react'; | |
import { | |
Keyboard, | |
Animated, | |
} from 'react-native'; | |
function KeyboardShrinkingView({ children, startHeight="100%", endHeight="0%" }) { | |
const scaleValue = useRef(new Animated.Value(0)).current; | |
const scaleOut = Animated.timing(scaleValue, { | |
toValue: 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const url = window.location | |
const detectChange = () => { | |
if (/^.*:\/\/.*youtube.com\/?$/.test(url)) { | |
} | |
else if (/^.*:\/\/.*youtube.com\/watch\?v=.*$/.test(url)) { | |
const related = document.querySelectorAll("#related").forEach(e => e.remove()) | |
const endscreen = document.querySelector(".html5-endscreen") | |
endscreen && endscreen.remove() | |
const upnext = document.querySelector(".ytp-upnext") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GRAB USER REVIEWS FROM THE GOOGLE PLAY STORE (works as of 5/2020) | |
// first load the page so all reviews are showing (hold space bar until it stops loading reviews) | |
// then open up developer tools ctrl-l and type the following AFTER UNDERSTANDING WHAT IT DOES | |
// never paste code you don't understand into the developer tool | |
// Goolge generates their css classes on page load | |
// use XPATH to extract html based on content / position | |
// this wont change based on page load |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// first load the page so all reviews are showing (hold space bar until it stops loading reviews) | |
// then open up developer tools ctrl-l and type the following AFTER UNDERSTANDING WHAT IT DOES | |
// never paste code you don't understand into the developer tools | |
// grab all reviews (which have css class "we-customer-review" | |
let reviews = [...document.querySelectorAll(".we-customer-review")] | |
// grab the stars for each review | |
// stars have the css class "we-star-rating-stars" | |
// the last character of the full class string happens to have the number of stars |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Animation = Class(function Animation() {}); | |
Animation.mixin(Canvas); | |
Animation.prototype.extend(Event.Listener); | |
Animation.prototype.extend({ | |
reset: function() { | |
this.relativePosition = 0; | |
this.maxPosition = this.totalFrames - 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create django app steps | |
# https://docs.djangoproject.com/en/3.0/intro/tutorial01/ | |
django-admin startproject mysite | |
django manage.py startapp appname | |
# create urls.py in app and templates/home.html | |
from django.urls import path | |
from . import views |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="current"></div> | |
<div class="container"></div> |