Skip to content

Instantly share code, notes, and snippets.

View Mikaela's full-sized avatar

Aminda Suomalainen ⚧ Mikaela

View GitHub Profile
@trysten
trysten / autossh.service
Last active October 14, 2018 20:53
autossh v0.3
# This unit file is meant to be run on a user service.
# Put it in ~/.config/systemd/user/ and enable it with `systemctl --user enable autossh`
# Use `loginctl enable-linger username` to start systemd user service at boot
# help here: https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files
[Unit]
Description=Maintain an ssh tunnel with systemd. What could go wrong?
After=network.target
[Service]
#user should set automatically
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active April 17, 2025 04:40
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

#!/bin/bash
hsurl="https://matrix.org"
access_token="this_was_totally_not_a_valid_token"
roomIds=($(curl "$hsurl/_matrix/client/r0/joined_rooms?access_token=$access_token" | tr '"' '\n' | grep !))
for roomId in ${roomIds[@]}
do
@erydactyl
erydactyl / tweetdeck-limit-override.js
Last active January 29, 2018 18:04 — forked from Zemnmez/tweetdeck-limit-override-dm-rt-fix.js
tweetdeck-limit-override.js
// ==UserScript==
// @name TweetDeck Cramming
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Allow 280 characters in a Tweet sent from TweetDeck automatically
// @author Erydactyl and Zemnmez
// @run-at document-idle
// @match https://tweetdeck.twitter.com/*
// @grant *
// ==/UserScript==
@posener
posener / go-shebang-story.md
Last active March 15, 2025 16:08
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@baweaver
baweaver / ruby_books.md
Last active April 11, 2025 11:21
A list of books for learning and expanding on your Ruby knowledge.

Ruby Book List

Learning Ruby

You're taking your first steps into Ruby

A good introduction to programming in general. Easy on newer programmers.

@cryzed
cryzed / fix-infinality.md
Last active March 20, 2025 13:16
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@ara4n
ara4n / bulk-reject.sh
Last active December 7, 2022 00:12
Bulk reject Matrix invites
access_token=SECRET
# if your sync is large you may need to run this a few times until it completes rather than storing a timeout error
curl "https://matrix.org/_matrix/client/r0/sync?access_token=$access_token" > sync.json
for i in `cat sync.json | jq -r '.rooms.invite|keys|join(" ")'`
do echo $i
curl "https://matrix.org/_matrix/client/r0/rooms/$i/leave?access_token=$access_token" --data '{}'
sleep 5
done
@maxpowa
maxpowa / simple_disconnect.cpp
Last active August 8, 2022 22:30
simple_disconnect module for znc 1.6+
/*
* Copyright (C) 2004-2015 ZNC, see the NOTICE file for details.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@jaukia
jaukia / gist:1d41a0045ab8e9f411ff
Last active August 25, 2021 05:22
Most active public GitHub users in Finland — Feb 2015

Most active public GitHub users in Finland

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 12 Feb 2014 13:09:28 GMT till Thu, 12 Feb 2015 13:09:28 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter((user) -> user.followers > 11)