Skip to content

Instantly share code, notes, and snippets.

View ThisIsNoahEvans's full-sized avatar

Noah Evans ThisIsNoahEvans

View GitHub Profile
@ThisIsNoahEvans
ThisIsNoahEvans / shortener.py
Created June 13, 2020 18:56
Link shortener
import requests
import json
longLink = input('')
res = requests.post('https://api.short.cm/links', {
'domain': 'go.itsnoahevans.co.uk',
'originalURL': longLink,
}, headers = {
'authorization': 'API'
@ThisIsNoahEvans
ThisIsNoahEvans / style.css
Created June 16, 2020 19:33
System Dark / Light mode CSS
/* Light mode */
@media (prefers-color-scheme: light) {
/* theme */
}
/* Dark mode */
@media (prefers-color-scheme: dark) {
/* theme */
}
@ThisIsNoahEvans
ThisIsNoahEvans / main.py
Created June 21, 2020 19:02
Keynotes Tweet/notif
import tweepy
import os
import json
import requests
import onesignal as onesignal_sdk
#Sets Font For Print
class colour:
purple = '\033[95m'
green = '\033[92m'

Apple Icons

Some may only be viewable on Apple devices

Some may also show as emoji; this seems to be a device/browser issue.

 is the logo

⌘ is command

⌥ is option

@ThisIsNoahEvans
ThisIsNoahEvans / style.css
Created April 3, 2021 16:16
CSS Gradient
#header {
background: linear-gradient(45deg, #753A88, #CC2B5E, #FF681C);
background-size: 400% 400%;
animation: gradient 15s ease infinite;
}
@keyframes gradient {
0% {
background-position: 0% 50%;
}
@ThisIsNoahEvans
ThisIsNoahEvans / ccdl.command
Last active September 21, 2021 12:06 — forked from ayyybe/ccdl.command
Adobe Offline Package Generator v0.1.2 (macOS only)
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@ThisIsNoahEvans
ThisIsNoahEvans / Generate self-signed SSL certs & keys from a script.md
Last active January 11, 2023 21:27
Generate self-signed SSL certs & keys from a script

I usually use this for generating SSL certificates for IP addresses - such as internally hosted applications, so they can be secured properly. You will need to manually install and trust the certificate on all clients that wish to access the service with SSL, and provide the cert & key to the service.

This is not a guide! It is simply a script I wrote in about 5 minutes to quickly generate certificates for IP addresses. It is very badly written but it works. Just about.

I won't be maintaining this unless the entire premise of SSL and self-signed certificates magically breaks overnight.

@ThisIsNoahEvans
ThisIsNoahEvans / README.md
Last active March 19, 2023 21:40
Generate self-signed cert for DNS name & add to macOS keychain

Generate a self-signed certifcate for a DNS name, and add it to the macOS Keychain as a trusted cert.

I wrote this in about 5 minutes - it is messy, it is badly coded, but it works for the purpose.

Just edit the domains array in the file to add the domain(s) you'd like to generate for.

@ThisIsNoahEvans
ThisIsNoahEvans / all-commits-graph.sh
Created March 15, 2024 23:45
Graph of all Git commits
#!/bin/bash
# Temporary file to accumulate all commit hours from all repos
ALL_COMMIT_HOURS_RAW="all_commit_hours_raw.txt"> "$ALL_COMMIT_HOURS_RAW" # Clear the contents to start fresh
# Generate a file with all hours listed (00 to 23)
for i in {0..23}; do printf "%02d\n" $i; done > hours.txt
# Use find to recursively search for Git repositories and process each
find . -type d -name ".git" | while read GIT_DIR; do