Skip to content

Instantly share code, notes, and snippets.

View ryqndev's full-sized avatar
enjoying Starbucks

Ryan Yang ryqndev

enjoying Starbucks
View GitHub Profile
@ryqndev
ryqndev / .zprofile
Created May 27, 2023 01:23
Sea creature terminal prompt
# Get git branch information
autoload -Uz vcs_info
precmd() {vcs_info}
zstyle ':vcs_info:git:*' formats ' branch:%b'
setopt PROMPT_SUBST
# Array of sea creature emojis
PREPEND_SEA_CREATURE=(🐳 🐬 🦭 🐟 🐠 🐡 🦈 🐙 🐚 🐋 🦑)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./script.js"></script>
</head>
<body>
@ryqndev
ryqndev / envoy.yaml
Last active December 4, 2020 23:42
inline conditional envoy response
static_resources:
listeners:
- name: main
address:
socket_address:
address: 0.0.0.0
port_value: 8000
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
@ryqndev
ryqndev / profile_gist.txt
Last active July 18, 2023 20:01
my recent activity
Most Recent Repo Commit: Wed, 14 Jun 2023 06:40:37 GMT
ryqndev/learn-ryqn-dev ███████████░░░░░░░░░ 6 commits
ryqndev/hacknights-s23 ██████░░░░░░░░░░░░░░ 3 commits
designatuci/DUCI-website████░░░░░░░░░░░░░░░░ 2 commits
Source: https://github.com/ryqndev/github-stats
@ryqndev
ryqndev / GCPTextRecognition.js
Last active November 17, 2018 22:02
Google Cloud Platform Text Recognition
// const GCPAPIKEY = 'Enter your key here';
// const IMAGEURL = 'https://images-na.ssl-images-amazon.com/images/I/816C3tZ76IL.jpg'
function getTextFromGCP(GCPAPIKEY, IMAGEURL){
var data = `
{
"requests": [
{
"image": {
"source": {
@ryqndev
ryqndev / getNewAspectRatios.js
Last active August 21, 2018 20:07
Get largest video possible when given a different aspect ratio
const aspectRatio = 16/9; //Aspect ratio of desired screen size
const cameraWidth = 1980; //Camera Width
const cameraHeight = 1080; //Camera Height
const cameraAspectRatio = cameraWidth/cameraHeight; //Camera Aspect Ratio
let newCamera = {
"size":{
"width": null,
"height": null
},