Skip to content

Instantly share code, notes, and snippets.

View mjudeikis's full-sized avatar
👽
Brewing something new...

Mangirdas Judeikis mjudeikis

👽
Brewing something new...
View GitHub Profile
@mjudeikis
mjudeikis / Makefile
Created October 27, 2021 12:16 — forked from ThinhPhan/Makefile
Setup Electron Kiosk App On Ubuntu 18.04
.PHONY: install uninstall test set-default
test:
sudo apt install plymouth-x11
sudo plymouthd ; sudo plymouth --show-splash ; for ((I=0; I<10; I++)); do sleep 1 ; sudo plymouth --update=test$I ; done ; sudo plymouth --quit
uninstall:
rm -rv /usr/share/plymouth/themes/first || true
install: uninstall
@mjudeikis
mjudeikis / user-data-wifi.yml
Created August 1, 2020 18:42 — forked from DieterReuter/user-data-wifi.yml
HypriotOS cloud-init configuration for RPi3 WiFi Client
#cloud-config
# vim: syntax=yaml
#
# The current version of cloud-init in the Hypriot rpi-64 is 0.7.9
# When dealing with cloud-init, it is SUPER important to know the version
# I have wasted many hours creating servers to find out the module I was trying to use wasn't in the cloud-init version I had
# Documentation: http://cloudinit.readthedocs.io/en/0.7.9/index.html
# Set your hostname here, the manage_etc_hosts will update the hosts file entries as well
@mjudeikis
mjudeikis / capture.go
Last active April 17, 2019 08:17 — forked from jim-minter/capture.go
capture.go
package capture
import (
"bufio"
"fmt"
"io"
"os"
"syscall"
"testing"
)
@mjudeikis
mjudeikis / xml.go
Created January 16, 2019 18:29 — forked from jim-minter/xml.go
package main
import (
"bytes"
"encoding/xml"
"os"
"text/template"
)
var tmpl = `
@mjudeikis
mjudeikis / cert_load.go
Created November 14, 2018 11:18 — forked from ukautz/cert_load.go
Go: Load all .pem files containing private key and certificate(s) from directory
package common
import (
"crypto"
"crypto/ecdsa"
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"encoding/pem"
"fmt"
@mjudeikis
mjudeikis / update-vmss-ssh-key.sh
Created November 9, 2018 10:05 — forked from agolomoodysaada/update-vmss-ssh-key.sh
Azure Virtual Machine Scale Set(VMSS) Reset SSH KEY
az vmss extension set \
--vmss-name <vmss-name> \
-g <resource-group> \
-n VMAccessForLinux \
--publisher Microsoft.OSTCExtensions \
--version 1.4 \
--protected-settings "{\"username\":\"deploy_user\", \"ssh_key\":\"$(cat ~/.ssh/id_rsa.pub)\"}"
# Upgrade ALL instances in the scale set with the new key
az vmss update-instances --instance-ids '*'
-n <vmss-name>
@mjudeikis
mjudeikis / dockerhub-v2-api-user.sh
Last active September 9, 2017 17:49 — forked from kizbitz/dockerhub-v2-api-user.sh
Get the list of images and tags for a Docker Hub user account.
#!/bin/bash
# Example for the Docker Hub V2 API
# Returns all imagas and tags associated with a Docker Hub user account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username and password
UNAME=""
UPASS=""
@mjudeikis
mjudeikis / delete-dockerhub-images.sh
Created September 9, 2017 10:33 — forked from jriguera/delete-dockerhub-images.sh
Delete Docker images on DockerHub
#!/bin/bash
# Based on kizbitz/dockerhub-v2-api-organization.sh at https://gist.github.com/kizbitz/175be06d0fbbb39bc9bfa6c0cb0d4721
# Example for the Docker Hub V2 API
# Returns all images and tags associated with a Docker Hub organization account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username, password, and organization
UNAME=""
UPASS=""
@mjudeikis
mjudeikis / [FEDORA] gitkraken
Last active September 8, 2017 08:52 — forked from aelkz/[FEDORA] gitkraken
How to install gitkraken on Fedora 25 + launcher icon
#!/bin/bash
# Download GitKraken
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz
# copy the downloaded file into /opt directory
cp gitkraken-amd64.tar.gz /opt/
cd /opt/
oc new-project skydive
oc annotate namespace skydive openshift.io/node-selector=' '
oc adm policy add-scc-to-user privileged system:serviceaccount:skydive:default
oc create -f https://raw.githubusercontent.com/garethahealy/skydive/master/contrib/openshift/skydive-template.yaml
oc new-app --template=skydive