Skip to content

Instantly share code, notes, and snippets.

View gmemstr's full-sized avatar
🏳️‍🌈
Free hugs!

Gabriel Simmer gmemstr

🏳️‍🌈
Free hugs!
View GitHub Profile
@gmemstr
gmemstr / get-gists.py
Created August 1, 2022 11:33
Download all gists for an authenticated user
#!/usr/bin/env python3
from os import makedirs, mkdir
import requests
# Generate a personal token for GitHub and replace it here.
GITHUB_USERNAME='username'
GITHUB_TOKEN='token'
def get_gists(page=1):
gist_list_url = 'https://api.github.com/gists'
@gmemstr
gmemstr / Pipfile
Last active March 1, 2024 05:50
Speedtest against Hetzner servers
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
requests = "*"
[dev-packages]
@gmemstr
gmemstr / bare-bones.scm
Last active September 7, 2021 19:09
guix example configuration extracted from the livecd
;; This is an operating system configuration template
;; for a "bare bones" setup, with no X11 display server.
(use-modules (gnu))
(use-service-modules networking ssh)
(use-package-modules screen ssh)
(operating-system
(host-name "komputilo")
(timezone "Europe/Berlin")
# Useful for parsing workflow API data
# ./main.py gh/gmemstr/circleci-koans
import requests
import sys
import json
import os
def GetWorkflowData(project, token):
url = "https://circleci.com/api/v2/insights/{project}/workflows/workflow?view=full&circle-token={token}".format(
project=project, token=token)
@gmemstr
gmemstr / Database.php
Last active November 14, 2019 17:32 — forked from t-seannn/Database.php
<?php
class Database {
// DB Parameters
private $host = 'localhost';
private $db_name = 'tournamentProject';
private $username = 'root';
private $password = '';
private $conn;
// DB Connect
@gmemstr
gmemstr / hsl.py
Last active October 4, 2019 18:15
HTTP Statuscode Lookup script
#!/usr/bin/python3
# This script requires python3 and BeautifulSoup.
# BS can be installed with pip3 install beautifulsoup4.
from bs4 import BeautifulSoup
import json
import urllib.request
import sys
import os
import io
#!/usr/bin/python3
#
# Print geolocation of IP collection file ips.txt file.
import requests
import json
api_key = ""
base_url = "http://api.ipstack.com/"
results = dict()
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Content-Length: 0
77.159.81.103 - - [10/Sep/2019 12:50:21] "GET / HTTP/1.1" 200 -
INFO:root:GET request,
Path: /global-protect/login.esp
Headers:
Host: 157.245.46.181

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

<?php
/**
* @file
* Self-altering PHP counting script. Ideal for lambdas?
*/
$count = 3;
$thisFile = fopen(__FILE__, 'r');
$thisFileContents = fread($thisFile, filesize(__FILE__));