Skip to content

Instantly share code, notes, and snippets.

@kemp
kemp / README.md
Created September 13, 2024 12:27
Configure Pop_OS! 22.04 theme from command line

Add the below files to your $PATH.

Usage:

Light mode:

light

Dark mode:

@kemp
kemp / readme.md
Created May 16, 2023 16:42
Local Nginx RTMP Server

Local RTMP Server

Useful for rebroadcasting to your local network

docker run --rm -p 1935:1935 tiangolo/nginx-rtmp

Then in OBS, set the stream settings:

@kemp
kemp / component.ts
Created January 5, 2023 19:25
Rendering Google Static Map Using TypeScript
class Component {
@Memoize()
imageUrl(clock: Clock|undefined): string {
if (clock === undefined || clock.latitude === undefined || clock.longitude === undefined) {
return '';
}
const clockCoords = clock?.latitude + ',' + clock?.longitude;
const circlePath = GeoUtils.encodeCircularPath(
@kemp
kemp / deploy.yaml
Created February 24, 2022 02:13
Basic GitHub Actions deploy script over SCP/SSH
# Actions define a job that runs on a GitHub runner (separate from the repo)
# Defines the conditions under which the job will run
on:
push:
branches: [ master ] # or main, if you use that
# Defines the jobs, of which we have two: "build" and "deploy"
jobs:
build:
@kemp
kemp / index.php
Created August 10, 2021 13:06
Reload page with content
<div class="container">
<button type="button" id="result-button">Refresh Content</button>
<div id="result-test">
<?= rand(0, 100) ?>
</div>
</div>
@kemp
kemp / MinMin.java
Last active November 16, 2019 22:19
Cloud Computing sorting algorithms
public void minMin() {
// Sort the cloudlet list so that they are in ascending order (lowest first)
cloudletList.sort((Comparator<Cloudlet>) (first, second) -> {
return (int) (first.getCloudletLength() - second.getCloudletLength());
});
double[] vmLoad = new double[vmList.size()];
for (Cloudlet cloudlet : cloudletList) {
// For each cloudlet (task)
@kemp
kemp / keybase.md
Created September 16, 2019 15:41
keybase.md

Keybase proof

I hereby claim:

  • I am kemp on github.
  • I am kemp (https://keybase.io/kemp) on keybase.
  • I have a public key ASA-qVcG9qWIjz7hGY2ZVx0kcHNGWAf-BCVtK4sG0vWEwQo

To claim this, I am signing this object:

@kemp
kemp / gist:fa666a023d241662c515eee9d8d2ecf5
Created November 27, 2017 20:06
Change Youtube Speed
// ==UserScript==
// @name Change Youtube Speed
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://*.youtube.com/*
// @grant none
// ==/UserScript==