Skip to content

Instantly share code, notes, and snippets.

View bishoplee's full-sized avatar
💭
I may be slow to respond.

Olaleye Olalekan Oladipo bishoplee

💭
I may be slow to respond.
View GitHub Profile
@bishoplee
bishoplee / Poll.jsx
Created January 16, 2022 07:12 — forked from adrianhajdin/Poll.jsx
Agora
import React, { useState, useEffect, useContext } from "react";
import Modal from 'react-modal';
import { Line } from 'rc-progress';
import { Text } from 'react-native';
import chatContext, {controlMessageEnum} from './ChatContext';
import { PollContext } from './PollContext';
import styles from './pollStyles';
@bishoplee
bishoplee / luhn.js
Created July 16, 2019 20:42 — forked from ShirtlessKirk/luhn.js
Luhn validation algorithm
/**
* Luhn algorithm in JavaScript: validate credit card number supplied as string of numbers
* @author ShirtlessKirk. Copyright (c) 2012.
* @license WTFPL (http://www.wtfpl.net/txt/copying)
*/
var luhnChk = (function (arr) {
return function (ccNum) {
var
len = ccNum.length,
bit = 1,
@bishoplee
bishoplee / validate_credit_card.js
Created July 13, 2019 20:08 — forked from DiegoSalazar/validate_credit_card.js
Luhn algorithm in Javascript. Check valid credit card numbers
// takes the form field value and returns true on valid number
function valid_credit_card(value) {
// accept only digits, dashes or spaces
if (/[^0-9-\s]+/.test(value)) return false;
// The Luhn Algorithm. It's so pretty.
var nCheck = 0, nDigit = 0, bEven = false;
value = value.replace(/\D/g, "");
for (var n = value.length - 1; n >= 0; n--) {
@bishoplee
bishoplee / MainActivity.java
Created March 2, 2019 16:27 — forked from stevesohcot/MainActivity.java
Android WebView - Splash/Loading screen (incomplete)
package com.diamondium.samplewebview;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.graphics.Bitmap;
import android.view.View;
import android.widget.ProgressBar;
@bishoplee
bishoplee / slim-app-tutorial.md
Created May 21, 2018 14:49
Creating your first Slim Framework Application

Creating your first Slim Framework Application

The Slim Framework is a great micro frameworks for Web application, RESTful API's and Websites. This Tutorial shows how to create a very basic but flexible project for every use case.

Table of contents