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
######### | |
# File: myapp-node-watcher.path | |
# | |
# Save this to /etc/systemd/system/ | |
# Run systemctl enable myapp-node-watcher.path && systemctl daemon-reload && systemctl start myapp-node-watcher.path | |
# | |
[Path] | |
PathModified=/home/myuser/myappdir/public_html | |
[Install] |
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
######################### | |
# | |
# NODE.JS app running in Apache | |
# sample .htaccess - partialy based on vielhuber/.htaccess | |
# Read also https://gist.github.com/vielhuber/f2c6bdd1ed9024023fe4 | |
# Also rules to enforce www. prefix and https: SSL access and avoid extra processing for any file defined. | |
# | |
# This file must be on the dir where Apache expects to find the website | |
# The Node App can be anywhere else but must be accessible as explained below. | |
# |
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
# force HTTPS and www. | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} (?!^www\.)^(.+)$ [OR] | |
RewriteCond %{HTTPS} off | |
RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L] | |
# alternative way | |
RewriteCond %{HTTP_HOST} !^$ | |
RewriteCond %{HTTP_HOST} !^www\. [NC] |
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
#export frames | |
avconv -i hatari.avi -vf fps=10 frames/ffout%03d.png | |
#assemble frames a gif | |
convert -loop 0 frames/ffout0*.png new.gif |
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 | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
class EnsureQueueListenerIsRunning extends Command | |
{ | |
/** | |
* The name and signature of the console command. |
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 | |
########################## | |
# | |
# Taken from https://forums.cpanel.net/threads/mass-delete-e-mail-accounts-script.387802/ | |
# Created by QuizKnows - https://forums.cpanel.net/members/quizknows.178313/ | |
# | |
if [ -z $2 ] | |
then |
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 | |
# | |
# chmodr.sh | |
# | |
# author: Francis Byrne | |
# date: 2011/02/12 | |
# | |
# Generic Script for recursively setting permissions for directories and files | |
# to defined or default permissions using chmod. | |
# |
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
//------------------------------------------------------------------- | |
// Altered 2014, Derek Neil | |
// add functionality on controlling final output | |
//------------------------------------------------------------------- | |
//------------------------------------------------------------------- | |
// Copyright (c) 2011, Jeff Preshing | |
// http://preshing.com/20110811/xkcd-password-generator | |
// All rights reserved. |
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 | |
/* | |
* Generate xkcd style password from /usr/share/dict/words | |
* | |
* http://xkcd.com/936/ | |
* apt-get install wamerican | |
*/ | |
if (!function_exists('wp_generate_password')) : | |
$filesize = @filesize('/usr/share/dict/words'); | |
if ($filesize !== false): |
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
# Alias definitions. | |
# You may want to put all your additions into a separate file like | |
# ~/.bash_aliases, instead of adding them directly in .bashrc. | |
# | |
# if [ -f ~/.bash_aliases ]; then | |
# . ~/.bash_aliases | |
# fi | |
# | |
# Reload bash with this command: . ~/.bashrc | |
# |