Skip to content

Instantly share code, notes, and snippets.

View geekyayush's full-sized avatar
🎯
Focusing

Ayush Somani geekyayush

🎯
Focusing
View GitHub Profile
@levelsio
levelsio / upgradeSubPrice.php
Created October 8, 2023 17:28
This script upgrades the price on active subscriptions on Stripe
<?
// set price
$newPricePlanId='price_1NsRt5Inbsdfsfddsf';
$newPriceMonthly=39;
$i=1;
foreach($users as $user) {
if(!$user['stripe_customer_id']) {
echo "No Stripe customer id, maybe update in db?";
@czue
czue / json_cleaner.py
Created September 21, 2023 11:25
OpenAI JSON Cleaner
def clean_and_parse_json_with_ai(json_string: str, openai_key: str):
clean_json_fn = {
"name": "clean_json",
"description": "Cleans JSON.",
"parameters": {
"type": "object",
"properties": {
"clean_json": {
"type": "string",
"description": "The cleaned JSON.",
@runevision
runevision / Unity versions not affected by Unity Runtime Fee.md
Created September 14, 2023 09:45
Unity versions not affected by Unity Runtime Fee

Unity versions not affected by Unity Runtime Fee

This is information that has been dug up by me and others in the Unity community. It's not official information from Unity (but most of the linked resources are). It is also not legal advise. I am not a lawyer.

TLDR:

Contrary to what Unity themselves are saying, for games made with these Unity versions, developers can elect not to be affected by a newer version of the Terms of Service that introduces the Unity Runtime Fee:

  • Unity 2022.x or earlier
  • Unity 2021.x LTS or earlier
@geocine
geocine / convert_original_stable_diffusion_to_diffusers_fix.py
Created December 26, 2022 18:50
convert_original_stable_diffusion_to_diffusers_fix.py
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@jschoormans
jschoormans / equirectangular.py
Created December 8, 2022 23:08
generate 3D panorama views with stable diffusion
# %%
import replicate
model = replicate.models.get("prompthero/openjourney")
version = model.versions.get("9936c2001faa2194a261c01381f90e65261879985476014a0a37a334593a05eb")
PROMPT = "mdjrny-v4 style 360 degree equirectangular panorama photograph, Alps, giant mountains, meadows, rivers, rolling hills, trending on artstation, cinematic composition, beautiful lighting, hyper detailed, 8 k, photo, photography"
output = version.predict(prompt=PROMPT, width=1024, height=512)
# %%
# download the iamge from the url at output[0]
import requests
@Miraculix200
Miraculix200 / gist:e0fc7c02e7911d840f3abe3c7cdae6f9
Created October 31, 2022 18:52
Dreambooth on SageMaker Studio Lab (save as .ipynb notebook)
This file has been truncated, but you can view the full file.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"cellView": "form",
"colab": {
"base_uri": "https://localhost:8080/"
},
@Olanetsoft
Olanetsoft / index.md
Last active December 9, 2022 00:31
Mara Blockchain Masterclass - Web3 developer Roadshow

Building and Deploying USDC-based Smart Contract

Building and Deploying USDC-based Smart Contract

This workshop is targeted at developers who are transitioning from Web2 to Web3 or have just recently gotten into Web3 and are looking to have a well-rounded foundation.

Step 1

Let's ensure we have Node/NPM installed on our PC. If we don't have it installed, head over here for a guide.

Step 2

@hadanischal
hadanischal / charles-proxy-android.md
Created July 14, 2021 05:38 — forked from twaddington/charles-proxy-android.md
How to set up Charles Proxy for the Android Emulator.

Charles Proxy Android

Steps

1. Add the Network Security Configuration to your app

<network-security-config>
   <debug-overrides>
 
@soygul
soygul / youtube-upload.js
Last active April 14, 2024 19:52
YouTube video uploader using JavaScript and Node.js
// YouTube API video uploader using JavaScript/Node.js
// You can find the full visual guide at: https://www.youtube.com/watch?v=gncPwSEzq1s
// You can find the brief written guide at: https://quanticdev.com/articles/automating-my-youtube-uploads-using-nodejs
//
// Upload code is adapted from: https://developers.google.com/youtube/v3/quickstart/nodejs
const fs = require('fs');
const readline = require('readline');
const assert = require('assert')
const {google} = require('googleapis');
@captn3m0
captn3m0 / 01-domains.md
Last active April 24, 2024 07:59
List of all Government of India domains

gov.in (7259)

  • aavin.tn.gov.in
  • abnhpm.gov.in
  • agnii.gov.in
  • ap.gov.in
  • aponline.gov.in
  • appolice.gov.in
  • attendance.gov.in
  • cgg.gov.in
  • eccs.gov.in