Skip to content

Instantly share code, notes, and snippets.

View emilfolino's full-sized avatar

Emil Folino emilfolino

View GitHub Profile
@emilfolino
emilfolino / docker
Created September 3, 2019 07:56
Rätta jsramverk
docker run -it -p 8081:8080 node:10 bash
@emilfolino
emilfolino / httpd-vhosts.conf
Created September 5, 2019 07:28
httpd-vhosts.conf
# Virtual Hosts
#
# Required modules: mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
@emilfolino
emilfolino / correct.bash
Created November 29, 2019 06:36
correct
#!/usr/bin/env bash
PASS=$(pass BTH\ Studkonto)
ssh [email protected] -i /home/efo/.ssh/dbwebb.pub -t "echo $PASS | sudo -S setpre-dbwebb-kurser.bash $3 $1"
dbwebb --yes inspect $1 $2 $3
@emilfolino
emilfolino / vulnerabilities.bash
Last active November 29, 2019 06:37
vulnerabilities
#!/usr/bin/env bash
repos=("slideorama" "auth" "showyourcity" "jsramverk.me" "ramverk2-me" "me-vue" "me-angular" "simulate-stock" "callbacks" "jsramverk" "gomoku")
for repo in "${repos[@]}"
do
echo "$repo"
if [[ ! -d "$repo" ]]; then
git clone "[email protected]:emilfolino/$repo.git"
fi
@emilfolino
emilfolino / cbsg.bash
Created November 29, 2019 06:42
Corporate Bullshit Generator
curl -s http://pasta.phyrama.com:8083/cgi-bin/live.exe | grep -Eo '^<li>.*</li>' | sed s,\</\\?li\>,,g | shuf -n 1
@emilfolino
emilfolino / booklet.js
Created September 28, 2021 13:40
Andra inlämningar
(function() {
const pathname = window.location.pathname;
const queryString = window.location.search;
const courseID = pathname.split("/")[2];
const studentMatch = /student_id=(\d+)/i;
const studentID = queryString.match(studentMatch)[1];
const canvasAuth = "Bearer [ERSÄTT MED egen token]";
const canvasURL = `https://bth.instructure.com/api/v1/courses/${courseID}/assignments`;