Skip to content

Instantly share code, notes, and snippets.

View anthonyk1225's full-sized avatar
🎯
Focusing

Anthony Keating anthonyk1225

🎯
Focusing
View GitHub Profile
def cracklepop
(1..100).each do |i|
if i % 3 == 0 && i % 5 == 0
puts 'CracklePop'
elsif i % 5 == 0
puts 'Pop'
elsif i % 3 == 0
puts 'Crackle'
else
puts i
@anthonyk1225
anthonyk1225 / ParallaxScrollView
Created April 9, 2020 15:21
example of ParallaxScrollView
stickyHeader = () => (
<View><Text>My Sticky Header</Text></View>
)
<ParallaxScrollView
parallaxHeaderHeight={700}
renderStickyHeader={this.stickyHeader}
stickyHeaderHeight={50}
renderForeground={() => (
<Fragment>
@anthonyk1225
anthonyk1225 / index.js
Last active October 19, 2023 14:11
Styling for react-paginate`'s first example in documentation
import React, { useState } from 'react';
import ReactPaginate from 'react-paginate';
import ArrowBackIosIcon from '@material-ui/icons/ArrowBackIos';
import ArrowForwardIosIcon from '@material-ui/icons/ArrowForwardIos';
import './pagination.css';
function App() {
const [pageCount, setPageCount] = useState(1);
const itemsLoaded = ({
limit,
@anthonyk1225
anthonyk1225 / rapidTest.js
Created November 17, 2020 16:50
COVID-19 rapid test algorithm
// leaked code for COVID-19 rapid test algorithm
const RapidTest = function(name, age, swabbed, fliched) {
this.name = name;
this.age = age;
this.wasSwabbed = swabbed;
this.flinched = fliched;
}
RapidTest.prototype.isPositive = function() {
const hasCorona = Math.random() <= 0.5;