Skip to content

Instantly share code, notes, and snippets.

View ridbay's full-sized avatar
💭
We're all born naked, the rest is CSS and Javascript.

Balogun Ridwan Babatunde Ridbay ridbay

💭
We're all born naked, the rest is CSS and Javascript.
View GitHub Profile
@ridbay
ridbay / deployTocPanel.yml
Last active May 4, 2023 11:53
Deploying github actions to cpanel
name: 🚀 Deploy File to cPanel
on:
push:
branches:
- master
jobs:
FTP-Deploy-Action:
name: 🎉 Deploy
runs-on: ubuntu-latest
@ridbay
ridbay / .htaccess
Last active May 16, 2020 20:13
Forcing HTTPS on some specific Folder
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(folder1|folder2|folder3) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
@ridbay
ridbay / .htaccess
Last active May 16, 2020 19:30
force http to https on one domain
RewriteEngine On
RewriteCond %{HTTP_HOST} ^myfirstdomain.com [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
@ridbay
ridbay / .htaccess
Last active May 16, 2020 19:25
force http to https
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
@ridbay
ridbay / index.html
Created January 20, 2020 20:40
MobileNet Full Source Code
<html>
<head>
<title>MobileNet Introduction</title>
<!-- Import script -->
<script src="https://unpkg.com/@tensorflow/tfjs@1.2.8" type="text/javascript"></script>
<script src="https://unpkg.com/@tensorflow-models/mobilenet@2.0.4" type="text/javascript"></script>
</head>
<body>
@ridbay
ridbay / index.html
Created January 20, 2020 20:39
MobileNet Full Script Tag
<script>
// Step 1: Load the model.
mobilenet.load().then(net => {
// Step 2: Grab and classify
const theImage = document.getElementById('img')
net.classify(theImage).then(result => {
// Step 3: Print top result
document.getElementById('message').innerText = `
Detected: ${result[0].className}
Probability: ${result[0].probability}`
@ridbay
ridbay / index.html
Created January 20, 2020 20:37
MobileNet Script Tag
<script>
// Step 1: Load the model.
mobilenet.load().then(net => {
console.log('Model loaded to memory!')
})
</script>
@ridbay
ridbay / index.html
Created January 20, 2020 20:36
ML MobileNet
<html>
<head>
<title>MobileNet Introduction</title>
<!-- Import script -->
<script src="https://unpkg.com/@tensorflow/tfjs@1.2.8" type="text/javascript"></script>
<script src="https://unpkg.com/@tensorflow-models/mobilenet@2.0.4" type="text/javascript"></script>
</head>
<body>
@ridbay
ridbay / index.html
Last active January 20, 2020 20:33
MobileNet Intro
<html>
<head>
<title>MobileNet Introduction</title>
</head>
<body>
<h1 id="message">Hello, I'm a simple web page!</h1>
</body>
@ridbay
ridbay / .cpanel.yml
Last active January 7, 2022 12:02
cpanel yml file
---
deployment:
tasks:
- export DEPLOYPATH=/home/cpanelUser/public_html/
- /bin/cp -R * $DEPLOYPATH