Skip to content

Instantly share code, notes, and snippets.

View yun14u's full-sized avatar

P T Nguyen yun14u

  • texas
View GitHub Profile
@mrpjevans
mrpjevans / kiosk.sh
Created June 30, 2020 15:00
Start Mopidy Iris in kiosk mode on Chromium on Raspberry Pi OS
#!/bin/bash
unclutter -idle 0.5 -root &
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/pi/.config/chromium/Default/Preferences
/usr/bin/chromium-browser --noerrdialogs --disable-infobars --kiosk http://127.0.0.1:6680/iris &
@mjvo
mjvo / MQTT_FeatherMO.ino
Last active August 10, 2020 12:51
Quickstart code for Arduino MQTT communication
/*
####################################################################################
MQTT PubSub implementation for Feather M0
For information on configuration:
http://mjvo.github.io/tutorials/circuits/mqtt/
External libraries required (available through Arduino Library Manager):
- WiFi101: https://www.arduino.cc/en/Reference/WiFi101
- PubSub Client by Nick O'Leary: https://pubsubclient.knolleary.net/
- arduino-timer by Michael Contreras: https://github.com/contrem/arduino-timer
@matthewpalmer
matthewpalmer / pod.yaml
Last active April 24, 2024 00:00
Example Kubernetes pod for the multi-container sidecar design pattern
# Example YAML configuration for the sidecar pattern.
# It defines a main application container which writes
# the current date to a log file every five seconds.
# The sidecar container is nginx serving that log file.
# (In practice, your sidecar is likely to be a log collection
# container that uploads to external storage.)
# To run:
@ivan-pinatti
ivan-pinatti / docker-configure-tls.sh
Last active January 13, 2024 19:32
Enable TLS in Docker service running in Ubuntu - #docker #docker-tls #tls #ubuntu
#!/usr/bin/env bash
: ' Script that enables TLS for Docker service in Ubuntu 16.x
This script is intended to be run as root
It;
- Generates the keys
- Creates the daemon.json Docker config file
@nacho4d
nacho4d / myproject_pom.xml
Last active February 17, 2017 16:21
myproject/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- THIS PRODUCT CONTAINS RESTRICTED MATERIALS OF IBM 5724-H88, 5724-J08,
5724-I63, 5655-W65, COPYRIGHT International Business Machines Corp., 2014
All Rights Reserved * Licensed Materials - Property of IBM US Government
Users Restricted Rights - Use, duplication or disclosure restricted by GSA
ADP Schedule Contract with IBM Corp. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<licenses>
@petruisfan
petruisfan / docker
Last active February 16, 2023 06:46
Docker init.d daemon script
#!/usr/bin/env bash
###############
# SysV Init Information
# description: docker daemon.
### BEGIN INIT INFO
# Provides: me
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 5
@sdmcraft
sdmcraft / setup-java.sh
Last active November 12, 2020 11:03
Setup java on linux
cd /opt/
yum -y install wget
curl -L -b "oraclelicense=a" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz -O
tar xzf jdk-8u131-linux-x64.tar.gz
cd /opt/jdk1.8.0_131/
alternatives --install /usr/bin/java java /opt/jdk1.8.0_131/bin/java 2
alternatives --config java
alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_131/bin/jar 2
alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_131/bin/javac 2
alternatives --set jar /opt/jdk1.8.0_131/bin/jar
@stonehippo
stonehippo / FTDI_Basic_Hookup_for_ESP-01.jpg
Last active January 6, 2022 14:09
Notes on using the ESP8266 with the Arduino IDE
FTDI_Basic_Hookup_for_ESP-01.jpg