Skip to content

Instantly share code, notes, and snippets.

View stairway-hacktober2020.py
def stairway(start, lines):
out = ""
num = start
for i in range(lines):
l_contents = [x+num for x in range(i+1)]
out += f"{' '.join(str(j) for j in l_contents)} "
num += i+1
out = out[:-1]
return out
@teamvista
teamvista / discord-gforms-webhook.gs
Last active Aug 18, 2020
A Google App Script to push a webhook to Discord.
View discord-gforms-webhook.gs
var POST_URL = "[Insert Webhook URL here]";
function onSubmit(e) {
var form = FormApp.getActiveForm();
var allResponses = form.getResponses();
var latestResponse = allResponses[allResponses.length - 1];
var response = latestResponse.getItemResponses();
var responseID = (latestResponse.getId()).substring(67,74); // Used for the unique identifier
var embedHeader = "Ticket ID " + responseID;
var responseTime = (latestResponse.getTimestamp()).toISOString();
View keybase.md

Keybase proof

I hereby claim:

  • I am teamvista on github.
  • I am teamvista (https://keybase.io/teamvista) on keybase.
  • I have a public key ASDRwpjmNeqYPLxhmBeGI87FNikdQRZ353tLAmh3RoPeyAo

To claim this, I am signing this object:

@teamvista
teamvista / PlayingCards.py
Created Oct 23, 2016
PlayingCards created by teamvista - https://repl.it/EDQX/3
View PlayingCards.py
# Program Name: ch9_notes_blackjack_5.py
# Developer: James Daniel
# Date: 10/18/2016
# Description: Objects- Chapter 9 Interactive Notes
# Basics to OOP:
# Abstraction
# Encapsulation ===============
# Client code should:
# * communicate w/ objects through method params and return values,
View ThisOldHouse.java
package House;
import java.applet.Applet;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import static java.awt.Color.darkGray;
import static java.awt.Color.lightGray;
@teamvista
teamvista / FTBShell.sh
Created Oct 27, 2013
Launches FTB within a shell in Automator.
View FTBShell.sh
export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)
export PATH=$JAVA_HOME/bin:$PATH
cd "Library/Application Support/ftblauncher"
java -jar FTB_Launcher.jar &