-
Single-line comments are started with
//
. Multi-line comments are started with/*
and ended with*/
. -
C# uses braces (
{
and}
) instead of indentation to organize code into blocks. If a block is a single line, the braces can be omitted. For example,
import json | |
import urllib | |
import urllib2 | |
import time | |
""" Nike plus activity log | |
https://developer.nike.com | |
Output: | |
-- May -- |
This is a sequel to "Postfix: relay to authenticated SMTP".
I would like to send mail from two different Gmail accounts using Postfix. Here is the relevant section in the Postfix documentation: Configuring Sender-Dependent SASL authentication.
As a concrete example, here's how to set up two Gmail accounts (only relevant sections of the config files are listed below):
/etc/postfix/main.cf:
# sender-dependent sasl authentication
smtp_sender_dependent_authentication = yes
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
#!/bin/bash | |
# Modified Pi-hole script to generate a generic hosts file | |
# for use with dnsmasq's addn-hosts configuration | |
# original : https://github.com/jacobsalmela/pi-hole/blob/master/gravity-adv.sh | |
# The Pi-hole now blocks over 120,000 ad domains | |
# Address to send ads to (the RPi) | |
piholeIP="192.168.1.1" | |
outlist='./final_blocklist.txt' |
about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar.
Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and
rendering normally. Some settings may also make firefox unstable.
I am not liable for any damages/loss of data.
Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions
(HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".
#!/bin/sh | |
apt-get -y install git bc | |
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
mkdir /etc/letsencrypt |
-
Find the Discord channel in which you would like to send commits and other updates
-
In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe!
# | |
# Requirements: | |
# - Python >= 3.5 | |
# - requests | |
# - aiohttp | |
# | |
import argparse | |
import asyncio | |
import json | |
import os |
Mastodon can store its assets in Amazon S3 (it speaks the S3 protocol). But it does not, by default, speak to Backblaze B2.
There are a couple of reasons why you might want that:
- you already know and trust B2
- it's cheaper
- you do not want to make your instance dependent on AWS
- etc.
cd /home/forge/pixelfed.social | |
git pull origin dev | |
composer install --no-ansi --no-interaction --no-progress --no-scripts --optimize-autoloader | |
echo "" | sudo -S service php7.2-fpm reload | |
php artisan config:cache | |
php artisan migrate --force | |
php artisan horizon:purge | |
php artisan horizon:terminate |