I hereby claim:
- I am HazCod on github.
- I am nhofmans (https://keybase.io/nhofmans) on keybase.
- I have a public key whose fingerprint is 11C8 F0F3 F757 9049 316F 322B 4A06 75C4 7CBE D349
To claim this, I am signing this object:
public function sluggify($string, $separator = '-', $maxLength = 96) | |
{ | |
$title = iconv('UTF-8', 'ASCII//TRANSLIT', $string); | |
$title = preg_replace("%[^-/+|\w ]%", '', $title); | |
$title = strtolower(trim(substr($title, 0, $maxLength), '-')); | |
$title = preg_replace("/[\/_|+ -]+/", $separator, $title); | |
return $title; | |
} |
# put this in your .bashrc or .bash_profile | |
function urlencode(){ | |
[ -z "$1" ] || echo -n "$@" | hexdump -v -e '/1 "%02x"' | sed 's/\(..\)/%\1/g' | |
} |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env bash | |
# exit script when something fails | |
set -e | |
# get curl source | |
git clone https://github.com/curl/curl /tmp/curl | |
# create weechat cert directory | |
mkdir -p ~/.weechat/certs |
# Raw command | |
BACKUP=$(tmutil latestbackup) ; if [ "$(cat ~/.lastbackup 2>/dev/null)" != "$BACKUP" ]; then echo $BACKUP > ~/.lastbackup ; osascript -e "display notification \"$(echo $BACKUP | xargs basename)\" with title \"Backup finished\""; fi | |
# As cron entry | |
*/5 * * * * BACKUP=$(tmutil latestbackup 2>/dev/null) ; if [ "$(cat ~/.lastbackup 2>/dev/null)" != "$BACKUP" ]; then echo $BACKUP > ~/.lastbackup ; osascript -e "display notification \"$(echo $BACKUP | xargs basename)\" with title \"Backup finished\""; fi 2>&1 >/dev/null |
FROM alpine | |
# the group id of the docker group on the host | |
ENV HOST_DOCKER_GID 101 | |
# SECURITY CONSIDERATIONS: | |
# Only expose this via a dedicated internal, encrypted net to your webserver/.. | |
# Mount /var/run/docker.sock READONLY, make this container readonly too | |
RUN addgroup -g $HOST_DOCKER_GID docker \ |
#!/usr/bin/env bash | |
#set -e | |
#set -x | |
# directory where your git repos reside | |
repo_dir="/home/hazcod/repos/" | |
# the repos in repo_dir that should be pulled from remote (origin) | |
repos=(myproject) |
-- Apache vhost config | |
``` | |
<VirtualHost *:443> | |
ServerName ssh.website.com | |
SSLEngine On | |
SSLCertificateFile /etc/ssl/cert.pem | |
SSLCertificateKeyFile /etc/ssl/privkey.pem | |
SSLCertificateChainFile /etc/ssl/fullchain.pem |
This current configuration is based of at least Server Version 1.16.5.1488 and Web Version: 3.108.2. | |
This updated config file allows the playing of trailers and TV Show theme music where as the previous one did not. | |
## Requirements | |
1. Apache version > 2.4 | |
2. A bunch of mod's enabled (proxy, ssl, proxy_wstunnel, http, dir, env, headers, proxy_balancer, proxy_http, rewrite) | |
3. Protocols h2 http/1.1 needs apachectl -V 2.4.17 and higher... | |
## Apache .conf file |
from os import system, path, makedirs | |
import sys | |
def autoload(): | |
move_to="/home/media/data/uploadme/movies/" | |
arr=sys.argv[2].split('/') | |
moviename=arr[6] | |
if not path.exists(move_to + moviename): | |
makedirs(move_to + moviename) |