Skip to content

Instantly share code, notes, and snippets.

View timothycarambat's full-sized avatar

Timothy Carambat timothycarambat

View GitHub Profile
@timothycarambat
timothycarambat / index.html
Created September 18, 2021 01:22
Easy Web3 Meta Mask Login - static HTML and Vanilla JS
<html>
<head>
<title>Web3 Metamask Login</title>
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
</head>
<body class="flex w-screen h-screen justify-center items-center">
<div class="flex-col space-y-2 justify-center items-center">
<button id='loginButton' onclick="" class="mx-auto rounded-md p-2 bg-purple-500 text-white">
@timothycarambat
timothycarambat / collect.py
Created September 15, 2021 01:59
Senate and House Stock watcher Python3 data listing
import requests, json, datetime
# This function will grab the data from house/senate stockwatcher and return an array
# of dictonary items that represent transactions
def fetch_data():
response = requests.get("https://senate-stock-watcher-data.s3-us-west-2.amazonaws.com/aggregate/all_transactions.json")
# response = requests.get("https://house-stock-watcher-data.s3-us-west-2.amazonaws.com/data/all_transactions.json")
if response.status_code != 200:
print("request failed.")
@timothycarambat
timothycarambat / configure
Created February 26, 2021 02:49
Updated Postgres 9.6.20 -> 9.6.3 configure file
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for PostgreSQL 9.6.3 (Product Hunt).
#
# Report bugs to <[email protected]>.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
@timothycarambat
timothycarambat / Kernel.php
Last active October 16, 2020 18:22
Laravel 8 - AWS Elastic Beanstalk Linux Distro - Use Laravel Scheduler - Confirmed Working Oct 16 2020.
<?php
// File located in App\Console\Kernel.php
namespace App\Console;
use Log;
use App\Helpers\BackgroundWorker;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
@timothycarambat
timothycarambat / package.json
Created March 31, 2020 00:37
Package.json - update version number - no SVN. Made for discord user.
const fs = require('fs');
const fileName = './package.json';
const file = require(fileName);
const currentVersion = file.version ? +file.version : 0
file.version = String(currentVersion + 1)
fs.writeFile(fileName, JSON.stringify(file,null,2), function writeJSON(err) {
if (err) return console.log(err);
console.log(JSON.stringify(file ,null,2));
@timothycarambat
timothycarambat / RCTModuleMethod.m
Last active February 22, 2020 05:49
react-native/React/Base/RCTModuleMethod.m for react-native 0.46.3 with xCode 11.3.1
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTModuleMethod.h"
@timothycarambat
timothycarambat / findMatchingSimulator.js
Created February 22, 2020 05:46
react-native/local-cli/runiOS/findMatchingSimulator.js <=0.46.3 for xCode 11.3.3 since matching schema changed.
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.*
*/
'use strict';
@timothycarambat
timothycarambat / index.html
Created September 11, 2019 17:47
Show Random URL in iframe on page load. r/programmingrequests for u/XxRewirexX :: https://www.reddit.com/r/programmingrequests/comments/d2kvyb/need_a_random_page_served_from_a_single_url/
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Random Page</title>
</head>
<body>
<script type="text/javascript">
var urlList = [
"https://thebandgo.com",
function myFunction() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var classes = [
"Character Sheet",
"Marauder",
"Warrior",
"Dark Knight",
"Gladiator",
"Paladin",
@timothycarambat
timothycarambat / index.html
Created May 8, 2019 06:13
random dice roller / table maker for u/Drastic_Saracen off r/programmingrequests REDDIT LINK: https://www.reddit.com/r/programmingrequests/comments/bj12ea/tables_creator_and_diceroller_sorta/
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Dice Roller</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<style media="screen">
td.selected {
background-color: #83dea8
}