View prepare_datadisk.yml
--- | |
vars: | |
data_device: /dev/disk/azure/scsi1/lun0 | |
data_disk_mount: /data | |
tasks: | |
- name: Setup data disk | |
become: true | |
block: | |
- name: Create partition on data disk |
View gist:ba534253adbe215b7cdbb3dc3bb1959e
$ ls /opt/sonatype/sonatype-work/nexus3/db/ | |
OSystem accesslog analytics audit component config model.properties security | |
$ docker-compose exec nexus java -jar ./lib/support/nexus-orient-console.jar | |
CONNECT PLOCAL:/opt/sonatype/sonatype-work/nexus3/db/component admin admin | |
REBUILD INDEX * | |
REPAIR DATABASE --fix-graph | |
REPAIR DATABASE --fix-links | |
REPAIR DATABASE --fix-ridbags |
View renamer.py
#!/usr/bin/env python3 | |
"""Rename files from format Safari Books Online Video Downloader | |
to more friendly""" | |
import os | |
import re | |
time_re = re.compile('(\d+m \d+s|\d+s).mp4') | |
number_re = re.compile('((\d{3})\s-\s).+.mp4') | |
chapter_re = re.compile('\d{3}-(\d+\s\d+).+.mp4') |
View esp8266_i2c_lcd.ino
// Library https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library | |
// Original from https://gist.github.com/bavensky/8cc772149df9e349014b | |
#include <Wire.h> | |
#include <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x27,20,4); | |
uint8_t heart[8] = {0x0,0xa,0x1f,0x1f,0xe,0x4,0x0}; | |
View _01.temp_sensor_01.ino
// Code based on | |
// https://github.com/adafruit/DHT-sensor-library/blob/master/examples/DHTtester/DHTtester.ino | |
// https://gist.github.com/igrr/7f7e7973366fc01d6393 | |
// https://github.com/iot-playground/Arduino/blob/master/ESP8266ArduinoIDE/DS18B20_temperature_sensor/DS18B20_temperature_sensor.ino | |
// esp8266 + dht22 + mqtt | |
#include "DHT.h" | |
#include <PubSubClient.h> | |
#include <ESP8266WiFi.h> |
View dht22_deepsleep.ino
// CPU 80MHZ, FLASH 4M/1M | |
/* | |
*** Sample using esp-01, D16 is connected to RST | |
*** If DHT22 is powered by a gpio( VCC of DHT22 is connected to a gpio) and OUTPUT of DHT22 is connected to D2, boot will fail. | |
*** Power off ----> D2 is in LOW( == DHT22 is in LOW) ==> SDIO boot mode. | |
Temperature and humidity values are each read out the results of the last measurement. | |
For real-time data that need continuous read twice, we recommend repeatedly to read sensors, | |
and each read sensor interval is greater than 2 seconds to obtain accuratethe data. |
View influxdb.conf
http { | |
client_max_body_size 20M; | |
upstream influxdb { | |
server server1:8086; | |
server server2:8086; | |
} | |
upstream relay { | |
server server1:9096; | |
server server2:9096; |
View tumblr-photo-ripper.rb
# Usage: | |
# [sudo] gem install mechanize | |
# ruby tumblr-photo-ripper.rb | |
require 'rubygems' | |
require 'mechanize' | |
# Your Tumblr subdomain, e.g. "jamiew" for "jamiew.tumblr.com" | |
site = "doctorwho" |
View RPi_I2C_driver.py
# -*- coding: utf-8 -*- | |
""" | |
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic | |
Made available under GNU GENERAL PUBLIC LICENSE | |
# Modified Python I2C library for Raspberry Pi | |
# as found on http://www.recantha.co.uk/blog/?p=4849 | |
# Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library | |
# added bits and pieces from various sources | |
# By DenisFromHR (Denis Pleic) |