apt install nginx
apt install libnginx-mod-rtmp
apt install ffmpeg
apt install stunnel4
vim /etc/nginx/nginx.conf
- Remove http {} and mail {}
import dns from 'node:dns'; | |
import fetch from 'node-fetch'; | |
import regions from "./regions.json" assert { type: "json" }; | |
import fs from 'node:fs'; | |
const IPINFO_API_KEY = "key here"; | |
const loops = 15000; | |
var regionscomplete = {}; |
apt install nginx
apt install libnginx-mod-rtmp
apt install ffmpeg
apt install stunnel4
vim /etc/nginx/nginx.conf
We want to upload file to a server with POST HTTP request. We will use curl functions.
// data fields for POST request
$fields = array("f1"=>"value1", "another_field2"=>"anothervalue");
// files to upload
$filenames = array("/tmp/1.jpg", "/tmp/2.png");;
#!/bin/bash | |
for i in $(tmutil listbackups | head -n $(( $(tmutil listbackups| wc -l) -3 ))); do tmutil delete ${i}; done |
The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.
I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
# Use modules installed with cpanm -L | |
use lib 'extlib/lib/perl5'; | |
use DBI; | |
use POSIX qw(strftime); | |
use Spreadsheet::WriteExcel; |
#!/bin/bash | |
# Set up ssh-agent | |
SSH_ENV="$HOME/.ssh/environment" | |
function start_agent { | |
echo "Initializing new SSH agent..." | |
touch $SSH_ENV | |
chmod 600 "${SSH_ENV}" | |
/usr/bin/ssh-agent | sed 's/^echo/#echo/' >> "${SSH_ENV}" |
#!/bin/sh | |
if [ $# -eq 0 ]; then | |
echo "Usage: $0 script args ..." | |
exit 1 | |
fi | |
SCRIPT=$1 | |
shift | |
env -i HOME="$HOME" PATH="$PATH" SHELL="$SHELL" "$SCRIPT" "$@" |
for i in {1..70}; do php data_template_associate_rra.php --rra='1:2:3:4:5' --data-template-id=$i; done | |
mysql cacti -e "update data_template_data SET rrd_step = '60';" |
#http://httpd.apache.org/docs/2.2/rewrite/intro.html#rewritecond | |
#http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond | |
#http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule | |
#Use NOT logic. If cookie doesn't exist then redirect. Otherwise, default behavior. | |
RewriteCond %{HTTP_COOKIE} !request_method | |
RewriteCond %{QUERY_STRING} ^$ | |
RewriteRule ^/$ /public/ [NE,R,L] |