Skip to content

Instantly share code, notes, and snippets.

View JJTech0130's full-sized avatar

JJTech JJTech0130

View GitHub Profile
<!DOCTYPE html>
<html>
<body>
<h2>HTML Buttons</h2>
<p>HTML buttons are defined with the button tag:</p>
<button>Click me</button>
</body>
@JJTech0130
JJTech0130 / fixmeta.py
Last active August 19, 2020 19:07
Usage: ./fixmeta.py --input $path_to_input_json --output $path_to_output_json
#!/usr/bin/python3
import os, hashlib, urllib.request, optparse, json
def get_remote_info(url):
remote = urllib.request.urlopen(url)
#Hash types
hash1 = hashlib.sha1()
hash256 = hashlib.sha256()
#Download data into buffer
data = remote.read()
#!/bin/bash
#File: installobs.sh (sudo chmod +x installobs.sh)
WORK_DIR=~/obs-build
PREFIX=/usr
APT_DEPS=(build-essential
checkinstall
cmake
git
libmbedtls-dev
// ==UserScript==
// @name Quizlet Match Hack
// @namespace Gabe B. Talafous
// @version 1.6
// @description The time will freeze at 0.5 and the answers will be the same color
// @author You
// @match https://quizlet.com/*/*
// @grant none
// @license MIT
// ==/UserScript==
@JJTech0130
JJTech0130 / run_once.js
Last active November 24, 2020 20:24
Workaround for a bug in VidCode (https://www.vidcode.com/)
/*
* Really nasty code to make sure the 'run_once' is only run once.
* JSHint (the VidCode linter) hates it, so I turned it off.
*
* VidCode has this weird quirk where it will run everything
* multiple times in a quick succession, and sharing the variables
* between sessions. This is the only way to make the timers work right.
*/
/* jshint ignore:start */
@JJTech0130
JJTech0130 / PicoCTF-based.py
Created December 20, 2020 22:25
Python script to beat the PicoCTF "based" challenge
#!/usr/bin/python3
import socket
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKCYAN = '\033[96m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
package main
import (
"bufio"
"crypto/tls"
"log"
"strings"
//"io"
"encoding/json"
# Select the Broadcom SPI interface for Raspberry Pi (SWD transport)
interface bcm2835spi
# Set the SPI speed in kHz
bcm2835spi_speed 31200 # 31.2 MHz
# Select correct chip
set CHIPNAME at91samd21g18
source [find target/at91samdXX.cfg]
import argparse, requests, urllib, os
from pyquery import PyQuery as pq
# CLI arguments
parser = argparse.ArgumentParser(description='OverDrive helper script')
parser.add_argument('--session',
help='manually set the session id (overrides \'OD_SESSION\' env)')
parser.add_argument('book',
<!DOCTYPE html>
<html>
<head>
<title>
Tic-Tac-Toe
</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";