It happens that there are many standards for storing cryptography materials (key, certificate, ...) and it isn't always obvious to know which standard is used by just looking at file name extension or file content. There are bunch of questions on stackoverflow asking about how to convert from PEM to PKCS#8 or PKCS#12, while many tried to answer the questions, those answers may not help because the correct answer depends on the content inside the PEM file. That is, a PEM file can contain many different things, such as an X509 certificate, a PKCS#1 or PKCS#8 private key. The worst-case scenario is that someone just store a non-PEM content in "something.pem" file.
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
# Simple No-ip.com Dynamic DNS Updater | |
# | |
# By Nathan Giesbrecht (http://nathangiesbrecht.com) | |
# | |
# 1) Install binary as described in no-ip.com's source file (assuming results in /usr/local/bin) | |
# 2) Run sudo /usr/local/bin/noip2 -C to generate configuration file | |
# 3) Copy this file noip2.service to /etc/systemd/system/ | |
# 4) Execute `sudo systemctl daemon-reload` | |
# 5) Execute `sudo systemctl enable noip2` | |
# 6) Execute `sudo systemctl start noip2` |
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
# Bash best practices and style-guide | |
Just simple methods to keep the code clean. | |
Inspired by [progrium/bashstyle](https://github.com/progrium/bashstyle) and [Kfir Lavi post](http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming/). | |
## Quick big rules | |
* All code goes in a function | |
* Always double quote variables |
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
<ruleset comparisonMethod="maven" | |
xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 http://mojo.codehaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd"> | |
<ignoreVersions> | |
<ignoreVersion type="regex">.*[Aa]lpha.*</ignoreVersion> | |
<ignoreVersion type="regex">.*[Bb]eta.*</ignoreVersion> | |
<ignoreVersion type="regex">.*M\d+$</ignoreVersion> | |
<ignoreVersion type="regex">.*-rc-\d+$</ignoreVersion> | |
<ignoreVersion type="regex">.*-b\d+$</ignoreVersion> | |
<ignoreVersion type="regex">.*\.pr\d+$</ignoreVersion> |
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
#!/bin/sh | |
## | |
# Quick Look Plugins | |
# @url http://caskroom.io | |
# @brief Quick Look Plugins installed via Homebrew Cask | |
# | |
# For a comprehensive overview of Quick Look plugins look here: https://github.com/sindresorhus/quick-look-plugins | |
# | |
brew cask install qlcolorcode # Preview source code files with syntax highlighting | |
brew cask install qlstephen # Preview plain text files without a file extension. Example: README, CHANGELOG, etc. |
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
# change modifier keys | |
# install brew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew install mas | |
mas upgrade | |
# core utils | |
brew install findutils ssh-copy-id unrar wget git hub gnutls gnu-tar trash fzf |
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
#!/bin/bash | |
# checkip.sh | |
# Detect when public IP address changes | |
# Add the following to the crontab (i.e. crontab -e) | |
# */30 * * * * ~/checkip.sh | |
# To successfully start SubstratumNode in privileged mode this script has to run as root or as a sudoer. | |
# When run by cron sudo can't prompt for a password. See creating /etc/sudoers.d/<username> and adding an entry like the following: | |
# %<your-user-here> ALL=(ALL) NOPASSWD:SETENV: /your/path/to/build/directory/node_ui/static/binaries/SubstratumNode | |
# Change paths ./recorded-ipv4 and SubstratumNode as needed for your system |
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
val (recycleQueue, recycleSource) = | |
Source | |
.queue[SoilStateReading](100, OverflowStrategy.dropTail) | |
.prefixAndTail(0) | |
.map(_._2) | |
.toMat(Sink.head)(Keep.both) | |
.run() | |
StreamConverters.fromInputStream(() => this.getClass.getClassLoader.getResourceAsStream("sensors.log")) | |
.via(SoilStateReading.csvParser) | |
.merge(Source.fromFutureSource(recycleSource)) |
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
[ | |
{"location": "Dublin", "datetime": "20171109T220000Z", "temp": 35}, | |
{"location": "Los Angeles", "datetime": "20171111T110000Z", "temp": 59 }, | |
{"location": "Los Angeles", "datetime": "20171111T070000Z", "temp": 59 }, | |
{"location": "Dublin", "datetime": "20171110T000000Z", "temp": 31}, | |
{"location": "Dublin", "datetime": "20171110T100000Z", "temp": 27}, | |
{"location": "Columbus", "datetime": "20171111T030000Z", "temp": 21 }, | |
{"location": "Dublin", "datetime": "20171110T190000Z", "temp": 27}, | |
{"location": "Los Angeles", "datetime": "20171109T220000Z", "temp": 62 }, | |
{"location": "Dublin", "datetime": "20171109T230000Z", "temp": 33}, |
NewerOlder