mkdir -m 700 /root/.ssh
echo "my public key" > /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
restorecon -r /root/.ssh
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
import React from 'react'; | |
export default class ComponentName extends React.Component { | |
componentDidMount() { | |
let children = this.collectChildren(this, (child) => { | |
return 'object' === typeof child; | |
}); | |
children = children.map(child => { |
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
# pip install django | |
# pip install clipboard | |
# pip install unidecode | |
from django.template import defaultfilters | |
import clipboard | |
from unidecode import unidecode | |
while True: | |
title = input("Input title: ") |
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 | |
# Source: | |
# https://gist.github.com/ericharth/8334664 | |
# | |
# Thanks: | |
# https://github.com/anderssonjohan | |
# | |
# Usage: | |
# ./createcertfilesfrompfx.sh /path/to/domain.pfx | |
# |
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
#!/usr/bin/env python2.7 | |
import sys, os | |
fileName = sys.argv[1] if len(sys.argv) > 1 else "default" | |
cwd = os.getcwd() | |
path = os.path.join(cwd, "{}.txt".format(fileName)) | |
print "File:" | |
print path |
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
const {exec} = require('child_process'); | |
const moment = require('moment'); | |
run('git describe') | |
.then(parseDescribe) | |
.catch(showError); | |
function parseDescribe(desc) { | |
const [tag, numOfCommits, lastCommit] = desc.trim().split('-'); |
System with OpenSSL installed
The *.pfx file is in PKCS#12 format and includes both the certificate and the private key. More information about the format could be found here
openssl pkcs12 -in certname.pfx -nocerts -out key.pem -nodes
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
version: "2" | |
services: | |
# https://hub.docker.com/r/linuxserver/plex | |
plex: | |
image: linuxserver/plex | |
container_name: plexpi | |
network_mode: host | |
environment: | |
- PUID=1000 |
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
defaults write com.apple.iphonesimulator AllowFullscreenMode -bool YES |