Skip to content

Instantly share code, notes, and snippets.

@nitram509
nitram509 / zoom.mute.applescript
Last active January 18, 2021 20:58
Scripts to mute and unmute the microphone in the current meeting, as well as start and stop the video feed
#!/usr/bin/osascript
on run argv
tell application "System Events"
tell application process "zoom.us"
if menu item "Mute Audio" of menu "Meeting" of menu bar 1 exists then
set mnu to menu item "Mute Audio" of menu "Meeting" of menu bar 1
click mnu
return
end if
@nitram509
nitram509 / update_qotd_virtual_background.sh
Created September 10, 2020 12:07
A script which inserts a fortune message and a date into Zoom's Background.
#!/bin/sh
#############################################################################
# A script which inserts a fortune message and a date into Zoom's Background.
# tested on macOS Mojave, 10.14.6
#############################################################################
# your personal Zoom settings
ZOOM_DB_PATH="/Users/xxx/Library/Application Support/zoom.us/data/zoomus.db"
# the command to figure out the currently defined background image
# you need to have sqlite installed on your machine
/**
* Test to re-produce https://github.com/MeteoGroup/jbrotli/issues/2
*/
#include <fcntl.h>
#include <string>
#include "../enc/compressor.h"
int main(int argc, char **argv) {
const bool is_last = true;
@nitram509
nitram509 / macaroons.js-benchmark.js
Last active August 29, 2015 14:13
macaroons.js benchmark
// requires
// $> npm install benchmark
var Benchmark = require('benchmark');
var suite = new Benchmark.Suite;
var MacaroonsBuilder = require('../index.js').MacaroonsBuilder;
var MacaroonsVerifier = require('../index.js').MacaroonsVerifier;
var serialized1 = (function prepare_a_macaroon_for_deserialization_with_string() {
@nitram509
nitram509 / JMacaroonsBenchmark.java
Last active August 29, 2015 14:13
JMacaroonsBenchmark
import com.github.nitram509.jmacaroons.Macaroon;
import com.github.nitram509.jmacaroons.MacaroonsBuilder;
import com.github.nitram509.jmacaroons.MacaroonsVerifier;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
public class JMacaroonsBenchmark {
@nitram509
nitram509 / hands_viewer.js
Last active August 29, 2015 14:10
Original source: JavaScript/hands_viewer.html
//..
function onHandData(mid, module, data) {
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
var radius = 5;
var scale = 1;
canvas.width = imageSize.width;
canvas.height = imageSize.height;