If you don't know what Wireguard is, well, you should. It's fast, easy to setup and highly configurable. We will configure Wireguard for multiple users with various restrictions using iptables.
This should fit most setups (not mine though 😉)
#!/usr/local/bin/python3 | |
# For Gigabyte M27Q KVM connected over USB-C | |
# | |
# Reads brightness value of builtin display from system, adapts it (Lunar-style) and sends over USB command to external display | |
# | |
# You need PyUSB and PyObjC | |
# | |
# Not much testing was done so far, only on MBP A1990 15" 2019 i7 555X | |
# |
If you don't know what Wireguard is, well, you should. It's fast, easy to setup and highly configurable. We will configure Wireguard for multiple users with various restrictions using iptables.
This should fit most setups (not mine though 😉)
The following worked with Elastic Cloud, Elasticsearch & Kibana v7.6.0. It should be pretty close for other kinds of deployments. Before starting, make sure you have the right license level that allows SAML.
#!/bin/bash | |
# | |
# Written by Chris Arceneaux | |
# GitHub: https://github.com/carceneaux | |
# Email: [email protected] | |
# Website: http://arsano.ninja | |
# | |
# Note: This code is a stop-gap to erase Job Artifacts for a project. I HIGHLY recommend you leverage | |
# "artifacts:expire_in" in your .gitlab-ci.yml | |
# |
{ | |
"Conditions": { | |
"WithSpotPrice": { | |
"Fn::Not": [ | |
{ | |
"Fn::Equals": [ | |
{ | |
"Ref": "SpotPrice" | |
}, | |
"0" |
// YOU HAVE TO : | |
// 1. install the Extended Choice Parameter Plugin : https://wiki.jenkins.io/display/JENKINS/Extended+Choice+Parameter+plugin | |
// 2. Allow the instanciation of ExtendedChoiceParameterDefinition in you script approval admin page https://myjenkins/scriptApproval/ | |
List params = [] | |
List props = [] | |
// https://github.com/jenkinsci/extended-choice-parameter-plugin/blob/master/src/main/java/com/cwctravel/hudson/plugins/extended_choice_parameter/ExtendedChoiceParameterDefinition.java#L427 | |
// https://issues.jenkins-ci.org/browse/JENKINS-34617 |
[Unit] | |
Description=Mongo shard service | |
After=syslog.target | |
After=network.target | |
After=bind9.service | |
[Service] | |
Type=fork | |
PIDFile=/var/run/mongos.pid | |
User=mongodb |
#include <stdio.h> | |
#include <Wire.h> | |
#include <ESP8266WiFi.h> | |
#include <BME280.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
// WiFi configuration | |
const char* ssid = "WIFI_SSID"; | |
const char* password = "WIFIT_PASSWORD"; |
-- Create a group | |
CREATE ROLE readaccess; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO readaccess; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
-- Grant access to future tables | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
// Don't forget to add Palette library to your build.gradle | |
// compile 'com.android.support:palette-v7:+' | |
public static int getDominantColor(Bitmap bitmap) { | |
List<Palette.Swatch> swatchesTemp = Palette.from(bitmap).generate().getSwatches(); | |
List<Palette.Swatch> swatches = new ArrayList<Palette.Swatch>(swatchesTemp); | |
Collections.sort(swatches, new Comparator<Palette.Swatch>() { | |
@Override | |
public int compare(Palette.Swatch swatch1, Palette.Swatch swatch2) { | |
return swatch2.getPopulation() - swatch1.getPopulation(); |