Skip to content

Instantly share code, notes, and snippets.

View raymelon's full-sized avatar
📺
vibe coding

Raymel raymelon

📺
vibe coding
View GitHub Profile
if (new URLSearchParams(window.location.search).get('portal')) {
// <create start portal>
// Create portal group to contain all portal elements
const startPortalGroup = new THREE.Group();
startPortalGroup.position.set(SPAWN_POINT_X, SPAWN_POINT_Y, SPAWN_POINT_Z);
startPortalGroup.rotation.x = 0.35;
startPortalGroup.rotation.y = 0;
// Create portal effect
@raymelon
raymelon / YahooPrices.gs
Created November 10, 2024 11:45 — forked from fcfort/YahooPrices.gs
Google App Scripts for querying Yahoo! finance API ticker prices
var _ = Underscore.load();
/*
* Queries Yahoo finance API for historical prices for a given list of tickers
*
* @param {Array} tickers A list of tickers
* @param {Date} date Date to query for. Must be a date the markets were open
* @return A map of ticker to adjusted close prices
*/
@raymelon
raymelon / semantic-commit-messages.md
Created September 12, 2024 01:06 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@raymelon
raymelon / how_to_get_telegram_chat_id.md
Created August 8, 2024 18:33 — forked from nafiesl/how_to_get_telegram_chat_id.md
How to get Telegram Bot Chat ID

How to get Telegram Bot Chat ID

Create a Telegram Bot and get a Bot Token

  1. Open Telegram application then search for @BotFather
  2. Click Start
  3. Click Menu -> /newbot or type /newbot and hit Send
  4. Follow the instruction until we get message like so
    Done! Congratulations on your new bot. You will find it at t.me/new_bot.
    
@raymelon
raymelon / google-form-to-tg.gs
Created July 13, 2024 12:51 — forked from HirbodBehnam/google-form-to-tg.gs
A google script to send submitted form results to a telegram bot
// Inspired by https://github.com/Iku/Google-Forms-to-Discord
const BOT_API = "YOUT_BOT_API";
const CHAT_ID = "CHAT_ID";
function onSubmit(e) {
var form = FormApp.getActiveForm();
var allResponses = form.getResponses();
var latestResponse = allResponses[allResponses.length - 1];
var response = latestResponse.getItemResponses();
var result = "";
@raymelon
raymelon / publickey-git-error.markdown
Created December 16, 2023 14:20 — forked from adamjohnson/publickey-git-error.markdown
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "[email protected]". Th
@raymelon
raymelon / barcode-mask-example-3.jsx
Created November 3, 2021 13:16 — forked from shahnawaz/barcode-mask-example-3.jsx
react-native-barcode-mask example usage
import React from "react";
import {
Text,
View,
Item,
Icon,
Input,
Button
} from 'native-base';
import { KeyboardAvoidingView } from "react-native";
@raymelon
raymelon / moment-greetings.js
Created January 2, 2021 07:39 — forked from AllanPooley/moment-greetings.js
Time based user greetings (Good Morning, Afternoon, Evening) using moment.js
getGreetingTime = (currentTime) => {
if (!currentTime || !currentTime.isValid()) { return 'Hello'; }
const splitAfternoon = 12; // 24hr time to split the afternoon
const splitEvening = 17; // 24hr time to split the evening
const currentHour = parseFloat(currentTime.format('HH'));
if (currentHour >= splitAfternoon && currentHour <= splitEvening) {
// Between 12 PM and 5PM
return 'Good afternoon';
@raymelon
raymelon / send_mj_templates.sh
Created December 27, 2020 04:14 — forked from bsartek/send_mj_templates.sh
Send a mailjet template through a shell script using environment variables
#!/bin/bash
: ${MJ_APIKEY_PUBLIC:="YOUR PUBLIC APIKEY HERE"}
: ${MJ_APIKEY_PRIVATE:="YOUR PRIVATE APIKEY HERE"}
: ${TEMPLATE:="291077"}
: ${TO:='[email protected]'}
: ${TO_NAME:='Testers'}
: ${FROM:='[email protected]'}
: ${FROM_NAME:='Your name'}
: ${SUBJECT:="Email sent by script $0"}
@raymelon
raymelon / RNMultipleTargetsInstructions.md
Created August 7, 2020 20:22 — forked from jacks205/RNMultipleTargetsInstructions.md
Settings up multiple app targets in React-Native