Skip to content

Instantly share code, notes, and snippets.

View maxisme's full-sized avatar
  ⚪️

Maximilian Mitchell maxisme

  ⚪️
View GitHub Profile
@maxisme
maxisme / 5Gmonitor.sh
Last active February 26, 2020 22:34
Tweet speeds of 5G router in E1
#!/bin/bash
# Maximilian Mitchell (max.me.uk)
# cron:
# 0 * * * * /usr/bin/curl -s https://gist.githubusercontent.com/maxisme/ea9bfe4cfcf5b89494a7a793253b8a60/raw/5Gmonitor.sh | bash
# requirements:
# - jq
# - speedtest
# - t
EXPECTED_DL=400
@mimoo
mimoo / compress_tar_gzip.go
Last active March 5, 2024 03:53
How to compress a folder in Golang using tar and gzip (works with nested folders)
package main
import (
"archive/tar"
"bytes"
"compress/gzip"
"fmt"
"io"
"os"
"path/filepath"
@salrashid123
salrashid123 / main.py
Last active April 4, 2022 17:28
GCP Log Consolidation with Flask
https://google-cloud-python.readthedocs.io/en/latest/logging/usage.html
https://google-cloud-python.readthedocs.io/en/latest/logging/usage.html#integration-with-python-logging-module
https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
NOTE: as of 9/7/18
https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5878
https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5885
@eddiewebb
eddiewebb / readme.md
Last active February 12, 2024 08:46
Hugo JS Searching with Fuse.js
@apisandipas
apisandipas / share-urls.md
Last active May 5, 2024 09:30 — forked from chrisjlee/drupal-views-share-global-text-field
Share url's for Facebook, Twitter, Pinterest and Linkedin with just get variables

Creating share buttons with just URL's

Twitter

http://twitter.com/share?text=<TITLE>&url=<URL>

E.g. http://twitter.com/share?text=This+is+google+a+search+engine&url=https%3A%2F%2Fwww.google.com

Facebook

http://www.facebook.com/sharer.php?u=&amp;p[title]=

@alexellis
alexellis / arm.md
Last active January 4, 2024 23:17
Test swarm connectivity

Regular PC / cloud architecture (64-bit)

See the snippets "guide.md" and "redis.md" below.

Swarm on a Raspberry Pi

If you're wanting to run Docker Swarm on your Raspberry Pi checkout these instructions:

@MarMed
MarMed / README.md
Last active May 1, 2024 12:18
Routing plex traffic through an SSH tunnel

Routing plex traffic through an SSH tunnel

This guide creates a reverse SSH tunnel to route all Plex server traffic through it.

Step 2 is done on the tunnel, all other steps are done on the plex server.

1. Setup SSH keys (if you already have key based authenthication setup skip to step 2)

On plex server:

@mattiaslundberg
mattiaslundberg / Ansible Let's Encrypt Nginx setup
Last active April 19, 2024 16:03
Let's Encrypt Nginx setup with Ansible
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@abhinavsingh
abhinavsingh / forwarder.py
Created August 29, 2013 13:29
Tornado websockets and ZMQ pubsub
import zmq
def main():
try:
context = zmq.Context(1)
frontend = context.socket(zmq.SUB)
frontend.bind('tcp://*:5559')
frontend.setsockopt(zmq.SUBSCRIBE, '')