This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def i2h_parse_line(line) | |
line.strip.split(';').first =~ %r{^\[([a-zA-Z0-9]+)\]$|^([a-zA-Z0-9\.]+)\s*\=\s*([a-zA-Z0-9\.]+)$} | |
data = [Regexp.last_match(1), Regexp.last_match(2), Regexp.last_match(3)] | |
data | |
end | |
def ini2hash(filename) | |
ini = {} | |
cur_section = nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$config = yaml_parse_file('config.yaml'); | |
$repo_full_name = $config['repo_full_name']; | |
$hookSecret = $config['hookSecret']; | |
set_error_handler(function($severity, $message, $file, $line) { | |
throw new \ErrorException($message, 0, $severity, $file, $line); | |
}); | |
set_exception_handler(function($e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# brew install cmake | |
# python3 -m venv face-recognition | |
# source face-recognition/bin/activate | |
# pip install dlib | |
# pip install face_recognition | |
# pip install opencv-python | |
import face_recognition | |
import cv2 | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:8140> | |
ServerName puppet-proxy | |
ServerAlias puppet-proxy.example.com | |
## SSL directives | |
SSLEngine on | |
SSLCertificateFile "/etc/puppet/ssl/certs/puppet-proxy.example.com.pem" | |
SSLCertificateKeyFile "/etc/puppet/ssl/private_keys/puppet-proxy.example.com.pem" | |
SSLCertificateChainFile "/etc/puppet/ssl/ca/ca_crt.pem" | |
SSLCACertificatePath "/etc/ssl/certs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int channel; // channel value | |
const int ledPin = 0; // Output pin for rearlight LED | |
const int inputPin = 1; // Input signal from RC-receiver | |
int ledState = LOW; // Start with led off | |
unsigned long previousMillis = 0; // will store last time LED was updated | |
int interval = 0; // interval at which to blink default value | |
void setup() { | |
pinMode(inputPin, INPUT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load Wi-Fi library | |
#include <WiFi.h> | |
#include <SoftwareSerial.h> | |
#include <TinyGPS.h> | |
//#include "SD.h" | |
//#include <SPI.h> | |
// Define CS pin for the SD card module |