Skip to content

Instantly share code, notes, and snippets.

View sarthaktexas's full-sized avatar

sarthak sarthaktexas

  • looking for a role
  • 20:36 (UTC -05:00)
View GitHub Profile
@sarthaktexas
sarthaktexas / starter.java
Created March 25, 2022 14:33
Starter code for UIL Team Competition
import java.util.*;
import java.io.*;
class Starter { // Change the name to file name
public static void main(String[] args) throws Exception {
File file = new File("input.dat");
Scanner scnr = new Scanner(file);
int count = scnr.nextInt();
scnr.nextLine();
for (int i = 0; i < count; i++) {

Keybase proof

I hereby claim:

  • I am sarthaktexas on github.
  • I am sarthakm (https://keybase.io/sarthakm) on keybase.
  • I have a public key ASAW7O6sfll7JXoIeLExQpEGL3jU6UP9SEoAm9e7vDqY6Qo

To claim this, I am signing this object:

@sarthaktexas
sarthaktexas / stripe.js
Created December 1, 2020 19:56
This script updates prices for up to 100 customers at a time. There IS manual config to do after running.
const stripe = require('stripe')('put your stripe secret key here');
const stripeFunction = async () => {
const subscriptions = await stripe.subscriptions.list({
limit: 100, // The max limit is 100, so you can do 100 at a time; change to whatever number you need to change
price: 'replace this with your price id' // This is the price id you want to replace
});
const count = subscriptions.data.length; // this is an optional line, just counts how many customers the Stripe API returns
subscriptions.data.forEach(async (data) => {
console.log( // Log update subscription object
@sarthaktexas
sarthaktexas / settings.json
Created September 3, 2020 05:47
settings.json for VS Code
{
"workbench.colorTheme": "Hypersubatomic",
"editor.fontLigatures": true,
"editor.formatOnType": true,
"files.autoSave": "afterDelay",
"git.autofetch": true,
"editor.tokenColorCustomizations": {
"textMateRules": [{
"scope": [
//following will be in italic (=FiraCode)
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body {
background-color: #6617cb;
background-image: linear-gradient(315deg, #6617cb 0%, #cb218e 74%);
}
.header-title-name {
font-family: "Inter", sans-serif;
text-transform: capitalize;
margin-bottom: 10px;