Skip to content

Instantly share code, notes, and snippets.

View Robotto's full-sized avatar
💭
Calibrating Self.ballmerPeak

Mark Moore Robotto

💭
Calibrating Self.ballmerPeak
  • Aarhus Gymnasium
  • Aarhus, DK
  • 01:14 (UTC +02:00)
View GitHub Profile

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@Robotto
Robotto / sciHub.sh
Last active September 5, 2021 13:08
Sci-Hub get PDF from DOI
#!/bin/bash
# Takes DOI strings as arguments for wget to first get SchHub info page, then extract pdf url, and then get that pdf!
# usage:
# Get a single pdf with: ./sciHub.sh 10.1145/1375761.1375762
# USe as many DOIs as arguents as you'd like :)
# to pass a list of DOI strings as arguments to this script you could use: "cat DOIS.txt | xargs ./sciHub.sh"
# replace .tw in the sci-hub url with whatever tld is currently in operation....
for DOI in "$@"
do
@Robotto
Robotto / gist:9db27ceead01c3ce7ece6406881f8c92
Last active October 31, 2021 18:55 — forked from criccomini/gist:3805436
Schedules & Scores API for Streaming Live Sports Stats - MSNBC
import pytz
import datetime
import time
import urllib2
import json
import os
import elementtree.ElementTree as ET
url = 'http://scores.nbcsports.com/ticker/data/gamesNEW.js.asp?jsonp=true&sport=%s&period=%d&random=%d'
@Robotto
Robotto / serialTest.py
Last active January 20, 2020 19:25
Pyserial example for receiving multiple values from an arduino
from time import sleep
import serial
#MAKE SURE THE BAUDRATE MATCHES WITH THE ARDUINO (Serial.begin(115200);)
#ser = serial.Serial("/dev/ttyACM0",115200) #Linux
ser = serial.Serial("COM3",115200) #Windows
while True:
sleep(1)
#The arduino is doing something like:
# Serial.print(x1);
@Robotto
Robotto / buttonRefresh.py
Created January 22, 2020 07:52
Emulate keyboard from GPIO
#buttonRefresh.py
#by robotto - november 2016
#reads a button on a pi and executes a call to xte with
# a key sequence.
# sudo apt-get install python-rpi-gpio python3-rpi.gpio
from subprocess import Popen, PIPE #to call xte
import RPi.GPIO as GPIO #for button
from time import sleep #for debounce
@Robotto
Robotto / Posiscale.ino
Created May 21, 2020 18:21
Positive scroll text on large dot matrix display (max7219)
//MAX7219
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Max72xxPanel.h>
#define stringArraySize 7
//int pinBatt = A0;
int pinCS = 8; // Attach CS to this pin, DIN to MOSI and CLK to SCK (cf http://arduino.cc/en/Reference/SPI )
int numberOfHorizontalDisplays = 4;
int numberOfVerticalDisplays = 1;
@Robotto
Robotto / bigboibuton.ino
Created June 14, 2020 19:52
quick and dirty button to trigger a random number generator for an exam type situation...
#include "Keyboard.h"
const int buttonPin = 10;
void setup() {
pinMode(buttonPin, INPUT_PULLUP);
Keyboard.begin();
}
void loop() {
@Robotto
Robotto / AGC_klasseliste_til_adobe_csv.py
Last active June 30, 2020 12:54
AGC klasseliste til adobe admin console kompatibel CSV
import csv
import sys
from bs4 import BeautifulSoup
#Dette script indeholder ikke hemmelige eller personfølsomme oplysninger, men behandler manuelt anskaffede personoplysninger.
#Programmet æder klasselister (uden billeder) genereret via aarhus tech selvbetjeningen.
#Gem den genererede side som PrintPage.html i samme mappe som dette script.
inputFilename = "PrintPage.html"
outputFilename = "_klasseliste_til_adobe_admin_console_upload.csv"
#run with python3
#js scraper code copied from: https://taras.codes/blog/linkedin-organization-follower-count/ ... replaced regex with string.strip
import socket
from pyquery import PyQuery
import string
import time
print(time.ctime(),"startup!")
TCP_IP = '5.79.74.16' #<-insert server IP here.
@Robotto
Robotto / tubeClamp.scap
Last active February 24, 2021 21:54
tubeClamp.scad
$fn = 32; //establish a decent roundness
length = 75;
height = 30;
width = 40;
bigHoleDiameter = 37.5;
filletRadius = 3;
/*