Skip to content

Instantly share code, notes, and snippets.

View iwatakeshi's full-sized avatar
📚
Always learning

Takeshi iwatakeshi

📚
Always learning
View GitHub Profile
@iwatakeshi
iwatakeshi / Ruby with chruby
Created October 20, 2023 14:40 — forked from rubyandcoffee/Ruby with chruby
chruby - Installing and managing Ruby versions
To install chruby and ruby-install:
brew install chruby ruby-install
To install Ruby using ruby-install:
ruby-install ruby 2.7.1
NOTE: You can find latest stable version of Ruby here: https://www.ruby-lang.org/en/downloads/
If you have issues installing Ruby then try the following:
brew install openssl@3
ruby-install 3.2.2 -- --with-openssl-dir=$(brew --prefix openssl@3)
@iwatakeshi
iwatakeshi / tilix_ubuntu_guide.md
Created March 7, 2023 20:21 — forked from agtbaskara/tilix_ubuntu_guide.md
Installation Guide for Tilix on Ubuntu

Install Tilix on Ubuntu 20.04

Install Tilix

sudo apt-get install tilix

Fix Tilix VTE

sudo ln -s /etc/profile.d/vte-2.91.sh /etc/profile.d/vte.sh
sudo chmod +x /etc/profile.d/vte.sh
@iwatakeshi
iwatakeshi / py_setup_popos.sh
Last active April 14, 2023 15:21
Setup Python on Pop_OS!
#!/bin/bash
# 1. Install python3 (if applicable)
if ! command -v python3 &> /dev/null; then
sudo apt update
sudo apt install python3
fi
# 2. Install pip (if applicable)
if ! command -v pip &> /dev/null; then
@iwatakeshi
iwatakeshi / $.ts
Created February 27, 2023 02:55 — forked from lawrencecchen/$.ts
next-auth with remix
// app/routes/api/auth/$.ts
import NextAuth from "~/lib/next-auth/index.server";
export const { action, loader } = NextAuth({
providers: [
GoogleProvider({
clientId: env.GOOGLE_CLIENT_ID,
clientSecret: env.GOOGLE_CLIENT_SECRET,
}),
],
@iwatakeshi
iwatakeshi / raspberry_fast_capture.py
Created October 10, 2022 20:22 — forked from CarlosGS/raspberry_fast_capture.py
Fast reading from the raspberry camera with Python, Numpy, and OpenCV. See the comments for more details.
# Fast reading from the raspberry camera with Python, Numpy, and OpenCV
# Allows to process grayscale video up to 124 FPS (tested in Raspberry Zero Wifi with V2.1 camera)
#
# Made by @CarlosGS in May 2017
# Club de Robotica - Universidad Autonoma de Madrid
# http://crm.ii.uam.es/
# License: Public Domain, attribution appreciated
import cv2
import numpy as np
@iwatakeshi
iwatakeshi / rename.ps1
Created January 1, 2022 04:04
Recursively rename files using PowerShell within a folder
Get-ChildItem *.tsx,*.js,*.css,*.ts -Recurse | Rename-Item -newname { $_.Name + ".txt" }
@iwatakeshi
iwatakeshi / google_login.ts
Created August 14, 2021 02:10 — forked from Brandawg93/google_login.ts
Login to Google Account via Puppeteer
import puppeteer from 'puppeteer-extra';
import pluginStealth from 'puppeteer-extra-plugin-stealth'; // Use v2.4.5 instead of latest
import * as readline from 'readline';
puppeteer.use(pluginStealth());
// Use '-h' arg for headful login.
const headless = !process.argv.includes('-h');
// Prompt user for email and password.
@iwatakeshi
iwatakeshi / RS256.sh
Last active October 14, 2020 04:32 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
# https://gist.github.com/ygotthilf/baa58da5c3dd1f69fae9#gistcomment-2932501
# 2048 bits
openssl genrsa -out private.pem 2048
openssl rsa -in private.pem -pubout -out public.pem
# 4096 bits
openssl genrsa -out private.pem 4096
openssl rsa -in private.pem -pubout -out public.pem
@responsive {
.text-shadow {
text-shadow: 0 2px 4px rgba(0,0,0,0.10);
}
.text-shadow-md {
text-shadow: 0 4px 8px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08);
}
.text-shadow-lg {