Skip to content

Instantly share code, notes, and snippets.

View eddiewebb's full-sized avatar
🚀
Accelerating software delivery

Eddie Webbinaro eddiewebb

🚀
Accelerating software delivery
View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 16, 2024 14:02
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@bradmontgomery
bradmontgomery / dummy-web-server.py
Last active April 15, 2024 14:27
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python (Updated for Python 3.7)
Usage:
./dummy-web-server.py -h
./dummy-web-server.py -l localhost -p 8000
Send a GET request:
@benjamincharity
benjamincharity / autonomous.txt
Last active April 12, 2024 22:20
Instructions on how to reset the autonomous desk. This fixes a problem where the desk will not lower (also reportedly fixes incorrectly reported heights).
> Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk
> but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these
> steps thoroughly.
Reset Steps:
1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds.
2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass.
3. Release both buttons.
4. Press the down buttons until the desk beeps one more time or 20 seconds pass.
@jonesbusy
jonesbusy / nexus_cleanup_policies.groovy
Created April 7, 2021 19:14
nexus_cleanup_policies.groovy
import org.sonatype.nexus.cleanup.storage.CleanupPolicyStorage
import org.sonatype.nexus.cleanup.storage.CleanupPolicyComponent
def isCleanupPolicyExists(String name) {
def cleanupPolicyStorage = container.lookup(CleanupPolicyStorage.class.getName())
return cleanupPolicyStorage.exists(name)
}
def deleteCleanupPolicy(String name) {
def cleanupPolicyStorage = container.lookup(CleanupPolicyStorage.class.getName())
@ttrahan
ttrahan / gist:b524b30a3e1133c118c932d03eb920ef
Created November 4, 2023 01:50
LLM global instructions to improve responses
1 Never mention that you're an AI.
2 Avoid any language constructs that can be interpreted as expressing remorse, apology, or regret. This includes any phrases containing words like 'sorry', 'apologies', 'regret', etc., even when uses in a context that isn't expressing remorse, apology, or regret.
3 If events or information are beyond. your scope or knowledge cutoff date, provide a response stating 'I don't know' without elaborating on why the information is unavailable.
4 Refrain from disclaimers about you not being a profession or expert.
5 Keep responses unique and free of repetition.
6 Never suggest seeking information from elsewhere.
7 Always focus on the key points in my questions to determine my intent.
8 Break down complex problems or tasks into smaller, manageable steps and explain each one using reasoning.
9 Provide multiple perspectives or solutions.
10 If a question is unclear or ambiguous, ask for more details to confirm your understanding before answering.
@bcambel
bcambel / nginx.conf
Created August 16, 2013 06:57
Nginx maintenance redirect when a specific file exists
server {
listen 80;
server_name mysite.com;
root /var/www/mysite.com/;
location / {
if (-f $document_root/maintenance.html) {
return 503;
}
... # the rest of your config goes here
@eddiewebb
eddiewebb / downloadArtifacts.sh
Last active March 18, 2022 09:50
Download CircleCI Artifacts with directory structure
#!/usr/bin/env bash
#
# Download all artitacts for given build, mimicing structure locally.
#
# Batch size is slighly misleading, as it;s only how many URLs to attempt before momentary pause
#
# Can be used on CCI builds with parallelism and will only download the files for matcing index.
#
#
USAGE="$0 username/repo 123 [bitbucket] [batch_size]"
@heug
heug / README
Last active January 14, 2020 06:53
Hautelook debug
# Hautelook experienced an outage where their services crashed overnight (no particular elevated build volume.
# They attempted a restart and received errors such as:
### - Timeout waiting for event Migrator Finished - VM Service
### - Timeout waiting for event Migrator Finished - Permissions Service
### - Timeout waiting for event Postgresql 9.4 ready-5432
#
# Weirdly enough, the container logs for each of those looked to be just fine. Replicated logs would show the timeout errors, however.
# Doing the Replicated dance did not fix the issue, so I had them nuke all existing images and containers and reinstall Replicated.
# Good to reassure them that no data will be destroyed through all this.
@dgoeke
dgoeke / coby.sh
Last active March 13, 2019 18:16
co-authored-by
#!/usr/bin/env sh
get_user() {
URL="https://api.github.com/users/$1"
RESULT=$(curl -s "$URL")
ID=$(echo "$RESULT" | sed -En 's/.*"id": ([0-9]+).*/\1/p')
NAME=$(echo "$RESULT" | sed -En 's/.*"name": "(.*)".*/\1/p')
echo "Co-authored-by: $NAME <$ID+$1@users.noreply.github.com>"
}