Skip to content

Instantly share code, notes, and snippets.

@a-gu
a-gu / fio.sh
Last active October 12, 2019 02:49
Upload a file to File.io using a bash function in "~/.bash_functions"
#!/usr/bin/env bash
# Upload file to File.io (optional expiration)
# fio file_name [expiration]
fio () {
if [[ "$#" -ge "2" ]]; then
curl -F "file=@$1" "https://file.io/?expires=$2";
elif [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo "Uploads a file to file.io"
@a-gu
a-gu / tasks_matlab.json
Last active January 29, 2019 23:57
Visual Studio Code "tasks.json" to non-interactively run MATLAB files in the Terminal
{
"version": "2.0.0",
"tasks": [
{
"label": "Run File in MATLAB",
"type": "shell",
"command": "matlab",
"group": {
"kind": "test",
"isDefault": true
@jakobii
jakobii / DockerMinecraftServerSetup.md
Last active August 12, 2025 08:00
Minecraft Server with Docker

Running a Minecraft Server with Docker on Ubuntu

Managing your Mincraft server with docker is a little bit nicer than just using the old "screen -r Mincraft" trick. docker can do snaphoting and auto restarting, and will allow you to think of the Mincraft server as a service, not just a java file that is being executed. Heres how I built mine. You should not have to edit the docker files. Just make sure you replace minecraft jar file version inside the code blocks when specified.

obviosly the only difference if your not using Ubuntu is the installation of java and the installation of docker

how to build it

Install all the things

@grimzy
grimzy / git-pull-all
Created September 15, 2017 02:15
Git pull all remote branches
#!/usr/bin/env bash
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
@codediodeio
codediodeio / database.rules.json
Last active March 24, 2026 17:32
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@danielmai
danielmai / Moss-README.rst
Last active March 3, 2024 11:16
Some words on getting started with Moss.

Checking Plagiarism with Moss

Moss (Measure of Software Similarity) is a service that is used to check for plagiarism with programming assignments.

Getting Started with Moss

Moss is simply a command-line script that sends the program files to a server. You