You need a shell.
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 sys | |
import os | |
from PIL import ImageFont | |
from PIL import Image | |
from PIL import ImageDraw | |
workdir = os.path.dirname(os.path.abspath(__file__)) | |
text = ' '.join(sys.argv[1:]) | |
print(text) |
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 python | |
""" | |
Very simple HTTP server in python. | |
Usage:: | |
./dummy-web-server.py [<port>] | |
Send a GET request:: | |
curl http://localhost |
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 logging, urllib2 | |
import https | |
client_cert_key = None # file path | |
client_cert_pem = None #file path | |
ca_certs = None # file path | |
handlers = [] | |
handlers.append( HTTPSClientAuthHandler( |
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 | |
############################################### | |
# To use: | |
# chmod +x install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
version=3.2.0 | |
echo "*****************************************" | |
echo " 1. Prerequisites: Install updates, set time zones, install GCC and make" |
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
# Install requirements | |
apt-get install -y build-essential | |
apt-get install -y checkinstall | |
apt-get install -y libreadline-gplv2-dev | |
apt-get install -y libncursesw5-dev | |
apt-get install -y libssl-dev | |
apt-get install -y libsqlite3-dev | |
apt-get install -y tk-dev | |
apt-get install -y libgdbm-dev | |
apt-get install -y libc6-dev |
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
# add PHP+Certbot repo | |
add-apt-repository ppa:certbot/certbot -y | |
apt-add-repository ppa:ondrej/php -y | |
# update + upgrade | |
DEBIAN_FRONTEND=noninteractive apt-get -yq update && apt-get -yq upgrade | |
# set time + locale | |
timedatectl set-timezone Europe/Budapest | |
locale-gen en_US en_US.UTF-8 | |
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 | |
# enable auto-update |
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
readonly CHAT_HOME=/opt/Rocket.Chat | |
readonly DOMAIN=[FILL-ME] | |
readonly WEBMASTER_MAIL=[FILL-ME] | |
# MongoDB | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 | |
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list | |
# Node.js | |
apt-get update -yq && apt-get install -yq curl && curl -sL curl -sL https://deb.nodesource.com/setup_8.x | sudo bash - | |
# Install deps | |
apt-get install -yq build-essential mongodb-org nodejs graphicsmagick |
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 | |
# check for root first | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
# update local packages | |
apt update |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <unistd.h> | |
#include <sys/personality.h> | |
#include <sys/utsname.h> | |
#define UNAME26 0x0020000 |
OlderNewer