Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 06:52
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@MatheusPoliCamilo
MatheusPoliCamilo / ssh.md
Last active April 27, 2024 06:50 — forked from EdnilsonRobert/ssh.md
Multiple SSH keys for GitHub and GitLab

Multiple SSH keys for GitHub and GitLab

1. Generate SSH keys

ssh-keygen -t ed25519 -C "user@email.com" -f ~/.ssh/id_rsa_github
ssh-keygen -t ed25519 -C "user@email.com" -f ~/.ssh/id_rsa_gitlab

2. Copy keys to GitHub and GitLab

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@lukeplausin
lukeplausin / pod-copy-data.sh
Last active April 27, 2024 06:42
Copy data from local filesystem into a pod in kubernetes
# If your pod container doesn't have bash in the path, you might need to replace `bash` with `/bin/bash/`, `/bin/sh` or `/bin/ash`.
# Simple string from the command line - puts the literal text 'AAA' into a new file /tmp/test.txt
echo 'AAA' > kubectl -n MyNamespace exec -ti $my_pod_id -c my-pod-container -- bash -c 'cat - > /tmp/test.txt'
# Copy / inject a file from the local filesystem into a new file in the pod in the remote kubernetes cluster
kubectl -n MyNamespace exec -i $my_pod_id -c my-pod-container -- bash -c 'cat - > /tmp/file.txt' </my/input/file.txt
@cirrusUK
cirrusUK / tv.sh
Last active April 27, 2024 06:41
watch live TV in VLC/MPV/Mplayer etc (#UK IP & account over at http://tvcatchup.com required.) moar info > http://cirrusminor.info/2013/10/19/uk-linux-users-watch-tv-in-vlc-mplayer/
#!/bin/bash
clear
ua="BlackBerry9000/4.6.0.167 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/102"
username="username from http://tvcatchup.com" #before using this script you will need an acc at http://tvcatchup.com
password="password from http://tvcatchup.com" #before using this script you will need an acc at http://tvcatchup.com
player="mpv" #can edit to prefered player
dati=`wget -U "$ua" --no-check-certificate --save-cookies=cookie.txt -q --keep-session-cookies "http://m.tvcatchup.com" -O-`
hash=`echo "$dati" | grep -o "&hash=[^&]*" | cut -d"=" -f2`
list=`echo "$dati" | grep -o '<a href="#" onclick="javascript:loadChannel([^)]*' | cut -d'(' -f2 | sed "s#, '#) #g" | sed "s#'##g"`
check=`wget -U "$ua" --save-cookies=cookie.txt --load-cookies=cookie.txt --keep-session-cookies --no-check-certificate --header "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" --header "X-Requested-With: XMLHttpRequest" --header "Referer: http://m.tvcatchup.com/" --post-data="username=${username}&hash=${ha
@cirrusUK
cirrusUK / weechat.txt
Created November 21, 2013 22:31
reference file for my weechat config
/server add geekshed irc.geekshed.net/6667
/server del freenode
/mouse enable|disable|toggle [<delay>]
/set weechat.look.mouse on
/set irc.server.geekshed.autoconnect on
/set irc.server.geekshed.command "/msg nickserv identify ********"
/set irc.server.geekshed.autojoin "#bleepingcomputer,#jupiterbroadcasting,#cirrus"
/set irc.server.freenode.username "cirrus"
@cirrusUK
cirrusUK / tpb.sh
Created November 26, 2013 18:04
shell script for use with transmission-cli to search the pirate bay torrents via TUI.
#!/bin/sh
#
# by Sairon Istyar, 2012
# distributed under the GPLv3 license
# http://www.opensource.org/licenses/gpl-3.0.html
#
### CONFIGURATION ###
# program to use for torrent download
# magnet link to torrent will be appended
@maartenbosteels
maartenbosteels / sh
Created November 28, 2023 08:22
monitor memory and cpu usage of a single process
PID=$1
echo "Monitoring CPU usage of process with PID ${PID}"
ps -ef | grep $PID
OUTPUT_FOLDER=~/.process_stats
mkdir -p ${OUTPUT_FOLDER}
MEM_STATS=${OUTPUT_FOLDER}/mem_${PID}.txt
@cirrusUK
cirrusUK / pms.py
Created December 4, 2013 19:49
standalone python script for searching,streaming,downloading mp3's from www.pleer.com script author https://github.com/np1/pms #python script 'poor mans spotify'
#!/usr/bin/python
''' pms
Copyright (C) 2013 nagev
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.