Skip to content

Instantly share code, notes, and snippets.

View JuanPotato's full-sized avatar
🥔
U+1F954

Hasan JuanPotato

🥔
U+1F954
View GitHub Profile
latitude longitude
38.41912644 -110.7827019
38.41870000 -110.7834529
38.41855994 -110.7838888
38.41836875 -110.7842912
38.4188157 -110.7842473
38.41937208 -110.7841499
38.41978072 -110.7844092
38.41996498 -110.7837023
@JuanPotato
JuanPotato / macro.user.js
Last active October 12, 2020 16:19
Input form macros
// ==UserScript==
// @name Macro Expander
// @namespace https://github.com/JuanPotato
// @match *://*/*
// @grant none
// @version 1.0
// @author Juan Potato
// @description Easy macro maker for inputs
// ==/UserScript==
#!/usr/bin/python3
# NOS teletext viewer
#
# To: CH23
# From: Potat
#
# The json api would have probably been easier to use, but this was fun
import requests
@JuanPotato
JuanPotato / rust_triage_shortcuts.user.js
Created October 17, 2019 18:46
A quick userscript to help rust triage
// ==UserScript==
// @name Rust triage shortcuts
// @namespace https://github.com/JuanPotato
// @match https://github.com/rust-lang/rust/pulls
// @grant none
// ==/UserScript==
// This list defines all the buttons that will be created and inserted. Because it is a list, order is preserved.
// You can use the date_days_ago(n) function to create a date in the format YYYY-MM-DD that was n days ago.
#!/usr/bin/env python3
from subprocess import Popen, PIPE
import statistics
import re
import sys
target_bin = ['./target/release/deps/testing-8d58e3cd27a1d9dd', '--bench', '--skip', 'regex', '--skip', 'fsm', '--skip', '0', '--skip', '1', '--skip', '2', '--skip', '3', '--skip', '4', '--skip', '6']
# use the direct binary

Keybase proof

I hereby claim:

  • I am JuanPotato on github.
  • I am juanpotato (https://keybase.io/juanpotato) on keybase.
  • I have a public key whose fingerprint is C463 E07A FEFD D4D2 4436 E655 3CB0 45F6 B981 DB45

To claim this, I am signing this object:

#![feature(test)]
extern crate test;
fn main() { }
static BENCH_NUMBER: i32 = 1000;
static LOOP_NUMBER: i32 = 1;
fn formula(n: i32, x: i32) -> i32 {
((n as f32/2.0) * (2 + 3 * (x / n - 1) + (x / n - 1).pow(2)) as f32) as i32
}
@JuanPotato
JuanPotato / sail_logs.sh
Last active April 25, 2017 20:26
Bash script to make it easier to quickly get logs of your sailfish device
#!/bin/sh
# MIT License Copyright (c) 2017 Hasan Ibraheem <Juan Potato>
function get_kmsg {
echo "Getting last_kmsg"
(echo cat /proc/last_kmsg; echo exit) | nc "$ip" "$port" | tail -n +12 > last_kmsg.log
}
function get_journalctl {
#!/usr/bin/python3
import binascii
import os
import re
from templates import * # Templates for the files, download it too
import sys
def open_as_theme(filename):
@JuanPotato
JuanPotato / terrariad
Last active January 31, 2019 02:42 — forked from jdavis/terrariad
Simple init.d Service script to start a Terraria Server
#!/bin/sh
#
# Terraria Config
#
#maxplayers=69
#world=/home/terrariaserver/.local/share/Terraria/Worlds/LetsNotFail.wld
#port=7777
#password=potato