Skip to content

Instantly share code, notes, and snippets.

View siriokun's full-sized avatar

Rio Purnomo siriokun

View GitHub Profile
YouTube IFRAME embed for faster page loads in privacy enhanced mode
https://magnushelander.se/youtube-no-cookies-embed-privacy/
@siriokun
siriokun / ddev-colima.md
Last active June 4, 2024 08:24
DDEV + Colima
brew install colima docker
colima start --cpu 4 --memory 4
# colima start (after computer restart)
# cd repo
ddev config --project-type=drupal9 --docroot=web --create-docroot
ddev start
# import db
ddev import-db --file=database.sql.gz
# uninstall modules
@rama-adi
rama-adi / README.MD
Created December 6, 2021 18:35
Use hCaptcha with any livewire component

Implement hCaptcha with Livewire Component

This is a simple way to implement hCaptcha with Livewire component.

NOTE: please read this carefully, and adjust variable names, etc to your use case

Setup

Before using this implementation, add their JS library first on your page

<script src="https://js.hcaptcha.com/1/api.js?hl=en" async defer></script>
@siriokun
siriokun / new-linux-setup.md
Last active March 17, 2023 09:25
New Linux Setup
  1. Setup Docker
sudo apt-get update
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

Run post-install step: https://docs.docker.com/engine/install/linux-postinstall/

  1. Setup Brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
@aelk00
aelk00 / remove-likes.md
Last active March 1, 2024 00:58
Remove all your facebook likes
@GoranLilja
GoranLilja / .zshenv
Last active December 28, 2021 21:15
MacBook setup
# Open application (or file with application)
alias vscode='open -a "Visual Studio Code"'
# Shortcut for editing this file
alias envedit='vscode /Users/goranlilja/.zshenv'
# Hide/show desktop icons
alias hideicons='defaults write com.apple.finder CreateDesktop false; killall Finder'
alias showicons='defaults write com.apple.finder CreateDesktop true; killall Finder'
# Jump directly to directories
alias code='cd ~/Code'
# Delete Xcode's Derived Data folder
@chris-chris
chris-chris / teachable_machine_with_upload.html
Last active June 24, 2024 09:02
Teachable Machine with upload button
<html>
<head>
<title>Teachable Machine Image Model with upload</title>
</head>
<body>
<img id="imagePreview" style="height: 300px;" />
<input id="imageUpload" type="file" />
<div>Teachable Machine Image Model with upload</div>
<div id="label-container"></div>
@vipulwairagade
vipulwairagade / deploy.yml
Created July 17, 2020 15:38
Deploy Action of Github Workflow
name: Deploy to Github Pages
on:
push:
branches:
- develop
jobs:
deploy:
name: Deploy Application
runs-on: ubuntu-latest
@cklanac
cklanac / mac-setup.md
Last active February 26, 2024 04:17
Mac setup

Mac Setup Distilled

Install Chrome, Dev and Canary

Description of Chrome Channels

  • Install Chrome or Chrome Dev
    • Note: Chrome and Chrome Dev use the same profile on a Mac
  • Setup 2 profiles:
    • Browsing: It may contain bookmarks, personal settings and extenstions
@kez
kez / alpine-todo.html
Last active June 10, 2023 03:41
Alpine.js Todo App Demo (with Tailwind). Please feel free to fork and refactor with improvements! Motivation/details here https://www.kdobson.net/2020/alpine-js-todo-demo/)
<!DOCTYPE html>
<html lang="en">
<head>
<title>Alpine.js Todo Demo</title>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.js" defer></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tailwindcss/ui@latest/dist/tailwind-ui.min.css">
<meta charset="utf-8">
</head>