Swappiness controls the tendancy the kernel wishes to swap.
Even with free memory the kernel may swap.
100 means aggressively swap 0 means wait until the last minute to swap
To check current swappiness
cat /proc/sys/vm/swappiness
Swappiness controls the tendancy the kernel wishes to swap.
Even with free memory the kernel may swap.
100 means aggressively swap 0 means wait until the last minute to swap
To check current swappiness
cat /proc/sys/vm/swappiness
#!/usr/bin/env python3 | |
from datetime import datetime | |
import sys | |
import subprocess | |
import requests | |
def main(): | |
username = sys.argv[1] |
from __future__ import unicode_literals | |
import os | |
from enum import Enum | |
from time import sleep | |
from datetime import datetime | |
from threading import Thread | |
import requests | |
import m3u8 | |
import streamonitor.log as log | |
from parameters import DOWNLOADS_DIR |
#!/usr/bin/env python3 | |
import os | |
import sys | |
import json | |
import signal | |
import subprocess | |
import requests | |
from ffmpy import FFmpeg, FFRuntimeError |
#!/usr/bin/env python | |
from twisted.internet import defer, reactor | |
from twisted.internet.protocol import Protocol | |
from twisted.web.client import Agent | |
from twisted.web.http_headers import Headers | |
def run(): | |
# create some requests for parallel execution |
Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.
/etc/ssh/sshd_config
file by running the command sudo vi /etc/ssh/sshd_config
and do the following
Port
to 2222 (or any other port above 1000)PasswordAuthentication
to yes. This can be changed back to no if ssh keys are setup.sudo service ssh --full-restart
This simple Gist will explain how to settup your GPG key to work for SSH authentication (with Git) and Git commit signing on Windows 10. This may seem straightforward on Linux, but there are certain tweaks needed on Windows.
No Cygwin, no MinGW, no Git Bash or any other Linux emulated environment. This works in pure Windows 10.
# An example to get the remaining rate limit using the Github GraphQL API. | |
import requests | |
headers = {"Authorization": "Bearer YOUR API KEY"} | |
def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section. | |
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers) | |
if request.status_code == 200: |