Skip to content

Instantly share code, notes, and snippets.

View gist:d8edc686246a8442517e345882990027
// ==UserScript==
// @name Google Meet breakout room reminder
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Google Meet breakout room reminder voice message
// @author fredrik.kronhamn@ga.ntig.se
// @match https://meet.google.com/*
// @grant GM_log
// ==/UserScript==
@simon04
simon04 / JwtTest.java
Created Feb 10, 2021
Configure RSA512 algorithm for com.auth0.jwt.JWT using an RSA private/public key generated by openssl
View JwtTest.java
import com.auth0.jwt.JWT;
import com.auth0.jwt.algorithms.Algorithm;
import org.bouncycastle.util.io.pem.PemReader;
import org.junit.Test;
import java.io.BufferedReader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.KeyFactory;
import java.security.interfaces.RSAPrivateKey;
View gist:9bce51452f1267769e71d70fe03a08da
apiVersion: app.kiegroup.org/v2
kind: KieApp
metadata:
name: insurance
spec:
environment: rhdm-production-immutable
upgrades:
enabled: true
commonConfig:
adminUser: userAdmin
View README.md

PR-14558 (Sha: 8dae9f0b)

OS: centos 7.6.1810 (Linux 3.10.0-957.1.3.el7.x86_64) GCC: gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) Host: ip-10-20-0-52.ca-central-1.compute.internal

Errors:

View Install composer on Amazon AMI running on EC2
$ cd ~
$ sudo curl -sS https://getcomposer.org/installer | sudo php
$ sudo mv composer.phar /usr/local/bin/composer
$ sudo ln -s /usr/local/bin/composer /usr/bin/composer
then you can run
$ sudo composer install
@choco-bot
choco-bot / FilesSnapshot.xml
Created Feb 10, 2021
nodejs v10.23.3 - Passed - Package Tests Results
View FilesSnapshot.xml
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\nodejs\nodejs.nupkg" checksum="E80C1C5BAB36C6BE575762749216AF50" />
<file path="C:\ProgramData\chocolatey\lib\nodejs\nodejs.nuspec" checksum="6AC93BB38C9908530A62D0A6B8610FDA" />
</files>
</fileSnapshot>
View _Map.java
package com.collection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
View gh-release-notes.yml
# New multiline script declaration
- script: |
# Release notes generator CLI lib instalation
npm i -g rng-cli@latest
# RNG call to generate the notes and store the result inside a .txt file
rng -o $(gh_org_name) -p $(gh_project_number) -t $(rng_gh_token) -c "DONE" >> $(release_notes_file_name)
# Print the content of the file
cat $(release_notes_file_name)
View upower_json.py
import dbus
import json
# https://upower.freedesktop.org/docs/Device.html
PROPERTIES_MAP = {
"Type": {
0: "Unknown",
1: "Line Power",
2: "Battery",
3: "Ups",
View RedBeanPHP Relations Example
// ~ ~ ~ ~ ~ ~ ~ DB Connect
require __DIR__ . '/vendor/gabordemooij/redbean/RedBean/redbean.inc.php';
R::setup('mysql:host=' . $config['db_host'] . ';dbname=' . $config['db_name'], $config['db_user'], $config['db_pass']);
R::debug(false);
R::exec('SET NAMES utf8');
R::exec('SET CHARACTER SET utf8');
// Автозагрузка моделей: http://bit.ly/13sORIP
require_once __DIR__ . "/Models/Model_User.php";