sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
# Set the maximum number of open file descriptors
ulimit -n 20000000
# Set the memory size for TCP with minimum, default and maximum thresholds
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'| import os | |
| import pickle | |
| from google.auth.transport.requests import Request # pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib | |
| from google_auth_oauthlib.flow import InstalledAppFlow | |
| from googleapiclient.discovery import build | |
| from django.db import models | |
| from django.conf import settings | |
| # Create your models here. | |
| class Greeting(models.Model): |
| import ctypes | |
| import os | |
| import signal | |
| from typing import Callable | |
| libc = ctypes.CDLL("libc.so.6", use_errno=True) | |
| # <linux/prctl.h> | |
| PR_SET_NAME = 15 | |
| PR_SET_SECCOMP = 22 |
Apple announced a new feature, "Sign In with Apple" enabling users to sign in to apps using their Apple ID. This new feature is meant to be a secure and privacy-friendly way for users to create an account in apps. Most iOS and Mac users already have an Apple ID, and this new feature lets them use that Apple ID to sign in to other apps and websites.
Apple is taking a firm stance to protect user's privacy, rather than letting applications see the user's real email address, they will provide the app with a fake or random email address unique to each app. Don't you worry! Developers will still be able to send emails to these proxy addresses, it just means developers won't be able to use the email addresses in any other way. This feature will also allow users to disable email forwarding per application.
Apple adopted the existing standards OAuth 2.0 and OpenID Connect to use as the foundation for their new API. If you're familiar
Do this in cases when you dont want to change the os-level settings, but only want to disable the OOM killer for a single process. This is useful when youre on a shared machine/server.
The OOM killer uses the process level metric called oom_score_adj to decide if/when to kill a process.
This file is present in /proc/$pid/oom_score_adj. The oom_score_adj can vary from -1000 to 1000, by default it is 0.
You can add a large negative score to this file to reduce the probability of your process getting picked and terminated by OOM killer. When you set it to -1000, it can use 100% memory and still avoid getting terminated by OOM killer.
| # this outputs JSON formatted logs which are easy to parse for any logging agent (such as fluentd) | |
| # the format conforms to Google Cloud Logging so logs are nicely structured in the logs viewer | |
| # see also: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#httprequest | |
| # put the following lines in your nginx config | |
| # /etc/nginx/nginx.conf | |
| log_format json_combined escape=json | |
| '{' | |
| '"time":"$msec",' |
Download the latest ugw3 package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb.
cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key