Skip to content

Instantly share code, notes, and snippets.

View se7enack's full-sized avatar
🏠
Working from home

Stephen Burke se7enack

🏠
Working from home
View GitHub Profile
@se7enack
se7enack / main.go
Last active November 14, 2024 23:24
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
var url = "https://ipv4ip.com/?format=json"
python3 -m venv .venv
source .venv/bin/activate
pip3 install --upgrade pip
pip3 install -r requirements.txt
@se7enack
se7enack / Keyboard-Interrupt.py
Last active October 20, 2024 18:51
Keyboard Interrupt and threading
#!/usr/bin/env python3
import time
import threading as thr
count = 5
def sleeping():
countdown = count
@se7enack
se7enack / .zshrc
Created October 18, 2024 16:14
test bash scripts in linux rather than mac by adding to bashrc of zshrc and typing 'linux'
alias linux='docker run -ti -w /opt -v .:/opt ubuntu bash'
@se7enack
se7enack / keyboard.py
Created October 10, 2024 00:52
on-screen keyboard
#!/usr/bin/env python3
import time
import random
from pywebio import start_server, config
from pywebio.output import *
from pywebio.session import run_js, local as session_local
from stuff import WORDLIST
@se7enack
se7enack / crypto-webapp.py
Last active October 9, 2024 15:36
crypto webapp
#!/usr/bin/env python3
import json
import requests
from pywebio import start_server
from pywebio.output import put_table
from pywebio.input import select
url = "https://api.coincap.io/v2/assets"
dic = {}
@se7enack
se7enack / ai.py
Last active October 8, 2024 03:14
ai webapp
import openai
from pywebio import start_server
from pywebio.output import put_table
from pywebio.input import input
openai.api_key = ''
def openai_response(name, question):
response = openai.ChatCompletion.create(
@se7enack
se7enack / dupes-delete.py
Last active October 7, 2024 18:20
deletes duplicate files
from collections import defaultdict
import subprocess
basedir = "/Users/user/Desktop/files"
dict1 = defaultdict(list)
dict2 = {}
count = 0
output = subprocess.check_output(['find', basedir, '-type', 'f'], text=True)
#!/usr/bin/env python3
import random
# base numbers, 5 numbers picks all unique, range is (1-69)
nums_range = 69
nums_count = 5
nums = []
# powerball, 1 numbers picked, range is (1-26)
@se7enack
se7enack / macos-hidden-dev-mode.sh
Created September 26, 2024 16:14
Enable secret developer mode on MacOS. (disable by running a second time)
open $(echo aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1vSGc1U0pZUkhBMA== | base64 -D)