This file contains hidden or 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
# name this file as "startup.sh" and call it from "startup command" as "/home/startup.sh" | |
# check out my YouTube video "https://youtu.be/-PGhVFsOnGA" | |
cp /home/default /etc/nginx/sites-enabled/default | |
cp /home/php.ini /usr/local/etc/php/conf.d/php.ini | |
# install support for webp file conversion | |
apt-get update --allow-releaseinfo-change && apt-get install -y libfreetype6-dev \ | |
libjpeg62-turbo-dev \ |
This file contains hidden or 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 python | |
import argparse | |
import redis | |
def connect_redis(conn_dict): | |
conn = redis.StrictRedis(host=conn_dict['host'], | |
port=conn_dict['port'], | |
db=conn_dict['db']) | |
return conn |
This file contains hidden or 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
$.ajax({ | |
url: "http://api.yoursite.com", | |
data: data, | |
type: "POST" | |
}).done(function(result) { | |
var link = document.createElement("a"); | |
document.body.appendChild(link); | |
link.setAttribute("type", "hidden"); | |
link.href = "data:text/plain;base64," + result; | |
link.download = "data.zip"; |
This file contains hidden or 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 smtplib | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
from email.mime.base import MIMEBase | |
from email import encoders | |
# Iniciamos los parámetros del script | |
remitente = '[email protected]' | |
destinatarios = ['[email protected]', '[email protected]', '[email protected]'] | |
asunto = '[RPI] Correo de prueba' |
This file contains hidden or 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 | |
/** | |
* LDAP PHP Change Password Webpage (modified for Active Directory) | |
* @author: Matt Rude <http://mattrude.com> | |
* @author: Isaiah Olson <http://www.olsontech.io/> | |
* @website: http://technology.mattrude.com/2010/11/ldap-php-change-password-webpage/ | |
* | |
* | |
* GNU GENERAL PUBLIC LICENSE |