Skip to content

Instantly share code, notes, and snippets.

View Josiassejod1's full-sized avatar

Dalvin Josias Sejour Josiassejod1

View GitHub Profile
@Josiassejod1
Josiassejod1 / srcset.rb
Created December 15, 2025 19:12
Extracting Largest SrcSet
def largest_srcset_image(srcset)
srcset.split(",")
.map { |entry| entry.strip.split(/\s+/) }
.max_by { |url, size| size.to_f }Expand commentComment on line R74Code has comments. Press enter to view.
&.first
end
@Josiassejod1
Josiassejod1 / subscription.js
Created May 30, 2025 18:59
Working Example of Stripe Subscription React Native
import React, { useState, useEffect } from 'react';
import { StyleSheet, View, TouchableOpacity, ActivityIndicator, Alert, Linking } from 'react-native';
import { ThemedView } from '@/components/ThemedView';
import { ThemedText } from '@/components/ThemedText';
import { useSubscription } from '@/context/SubscriptionContext';
import { useStripe } from '@stripe/stripe-react-native';
import { getAuth } from 'firebase/auth';
import { STRIPE_CONFIG } from '@/config/stripe';
import Stripe from 'stripe';
@Josiassejod1
Josiassejod1 / .bash
Created May 24, 2025 04:45
bulk rename
cd /Users/dalvin/Documents/JorgesJourney/assets/sounds/numbers && for f in *.wav; do mv "$f" "${f%.wav}.mp3"; done
@Josiassejod1
Josiassejod1 / language.py
Created May 10, 2025 19:35
Text-To-Speech For Jupyiter Notebook
import torch
import torchaudio
from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5HifiGan
from datasets import load_dataset
import json
import os
import soundfile as sf
# Load TTS processor, model, and vocoder
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
@Josiassejod1
Josiassejod1 / GoogleHackMasterList.txt
Created June 15, 2023 00:43 — forked from mylamour/GoogleHackMasterList.txt
The definitive super list for "Google Hacking".
admin account info" filetype:log
!Host=*.* intext:enc_UserPassword=* ext:pcf
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
"AutoCreate=TRUE password=*"
"http://*:*@www” domainname
"index of/" "ws_ftp.ini" "parent directory"
"liveice configuration file" ext:cfg -site:sourceforge.net
"parent directory" +proftpdpasswd
Duclassified" -site:duware.com "DUware All Rights reserved"
duclassmate" -site:duware.com
@Josiassejod1
Josiassejod1 / index.js
Created July 9, 2022 19:14
Scraping Multiple Sites With Nightmare JS
const Nightmare = require("nightmare");
const nightmare = Nightmare();
const clientSites = ["google.com", "pbs.org", "espn.com"];
var _prefix = "https://www.";
(async () => {
for (var i = 0; i < clientSites.length; i++) {
const site = clientSites[i];
@Josiassejod1
Josiassejod1 / Moralis.js
Created April 16, 2022 19:14
Moralis Function for React
//Get a relation
const { user } = useMoralis();
const postObject = useNewMoralisObject('Property');
async function getPropeties() {
const properties = user.relation('properties');
const results = await properties.query().find();
setProperty(results);
@Josiassejod1
Josiassejod1 / CharacterStorage.sol
Created December 30, 2021 06:51
Saving Address to Smart Contract
pragma solidity 0.6.6;
pragma experimental ABIEncoderV2;
// All thought this is highly convoluted, this was intented to save the names of hereos and their attributes
// from my marvel vs capcom 2 api https://rapidapi.com/Josiassejod1-WNU9Fi2D8/api/marvel-vs-capcom-2/details
contract CharacterStorage {
mapping(address => Character[]) characters;
struct Character {
@Josiassejod1
Josiassejod1 / Carousel.js
Last active August 28, 2021 08:50
Simple Image Carousel (React Native)
alive = true
growing = 🌱
while (alive)
growing += 💧🌞
end