Skip to content

Instantly share code, notes, and snippets.

View rougeth's full-sized avatar

Marco Rougeth rougeth

View GitHub Profile
twfahey1 /
Last active November 25, 2023 23:36
Using Google API credentials.json file in Github Action or other scripts

The question: What is the best way we can use Google API via a service account in Github Actions? Answer: encrypt the credentials and decrypt during Action w/ a configured secret.

  • The credentials.json.gpg is originated from the credentials.json that can be downloaded from Cloud Console for the service account.
  • Encrypt it via: gpg --symmetric --cipher-algo AES256 credentials.json - Note the password used, as it will be added as a secret in this repo to be used for decoding the file and accessing Google APIs.
  • Update the credentials.json.gpg file in this repo using the contents of the newly created credentials.json.gpg, commit and push.
  • The password used should be added as a secret, e.g. the GOOGLE_API_PW secret in the github repo

Then, in the Github action or script, call gpg to decrypt and write the unencrypted file:

View when-will-web-browsers-be-complete.txt
A short exploration into the end game of web browsers.
This article may seem to be about bashing Google but it isn't. It's just about
reflecting on the current state and how much longer we should see ourselves
So what is the Web? Well we can agree the Web is a conglomerate of standards
proposed by the W3C. So what do those standards define?
chrisdiana /
Last active September 17, 2023 21:46
Getting mosh server running on macOS Catalina

Running into this error message when trying to run a mosh server on macOS Catalina? The steps below should solve the problem which is most likely either a $PATH and/or firewall issues.

command not found: mosh-server
Connection to X.X.X.X closed.
/usr/local/bin/mosh: Did not find mosh server startup message. (Have you installed mosh on your server?)

1. Install Mosh

nileshtrivedi /
Last active October 22, 2023 11:53
Home Server setup: Raspberry PI on Internet via reverse SSH tunnel

Raspberry Pi on Internet via reverse SSH tunnel

HackerNews discussed this with many alternative solutions:

I already have my own domain name: I wanted to be able to run some webapps on my Raspberry Pi 4B running perpetually at home in headless mode (just needs 5W power and wireless internet). I wanted to be able to access these apps from public Internet. Dynamic DNS wasn't an option because my ISP blocks all incoming traffic. ngrok would work but the free plan is too restrictive.

I bought a cheap 2GB RAM, 20GB disk VM + a 25GB volume on Hetzner for about 4 EUR/month. Hetzner gave me a static IP for it. I haven't purchased a floating IP yet.

jnewc / NotesApp.swift
Last active November 11, 2023 23:45
A notes app written in >100 lines of swift using SwiftUI
View NotesApp.swift
import SwiftUI
let dateFormatter = DateFormatter()
struct NoteItem: Codable, Hashable, Identifiable {
let id: Int
let text: String
var date = Date()
var dateText: String {
dateFormatter.dateFormat = "MMM d yyyy, h:mm a"
hjertnes / doom.txt
Created April 6, 2018 08:28
Doom Emacs Cheatsheet
View doom.txt
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
noln / ffmpeg_commands.txt
Last active September 11, 2023 19:17
Handy FFMPEG Commands for Quickly Processing GoPro Videos
View ffmpeg_commands.txt
1) Concatenate a list of videos into one
ffmpeg -f concat -safe 0 -i tojoin.txt -c copy output.mp4
// Format of tojoin.txt:
file 'file0.MP4'
file 'file1.MP4'
file 'etc..
2) Scale down 4k video to
mterwill /
Last active October 21, 2023 00:56
Beancount importers, scripts, etc.

Note: everything here is pretty specific to my usage/accounts and not written for public use... You'll probably have to tweak a bunch of stuff.

$ bean-extract ~/Downloads # the csvs should be in here
junkblocker /
Created March 23, 2016 18:16 — forked from zotherstupidguy/
A Quick Guide for Anonymous and Pseudonymous irc

##Weechat+Arch Linux+Tor ###A Quick Guide for Anonymous and Pseudonymous irc I'm going to assume you know what irc is, and generally how it works. If you haven't gotten that far watch a youtube video and try out some of the commands on an irc webclient somewhere. On Arch Linux to install Weechat you can run sudo pacman -S weechat or you can download it from the official website at

You can also install Tor from the official repositories, but If you are going to be making multiple connections to irc networks and you want to keep your identities seperate, I would recommend installing the Tor Browser Bundle as well. This should be done from the Tor website, and you should check the GnuPG signature on the package before running it. The key they have been using to sign the packages with for the months that I have been verifying it i

rafaelrinaldi /
Last active December 15, 2015 16:57
Signing Git commits

Signing Git commits


Because after reading this blog post (sent by my dear friend @hugobessaa) I got paranoid. It's a little effort that can avoid a lot of trouble.

The problem

  1. User changes the commit author using the --author option
  2. The commit then introduces a new bug (blaming the new author)