-
namespaces - overview of Linux namespaces http://man7.org/linux/man-pages/man7/namespaces.7.html
-
mount_namespaces - overview of Linux mount namespaces
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"os" | |
"bytes" | |
"encoding/pem" | |
"crypto/tls" | |
"crypto/x509" | |
) |
This file contains hidden or 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
# 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: |
This file contains hidden or 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
Scenario: | |
You have a long-running branch to upgrade your existing codebase to django 1.7. | |
You've previously used south, and your existing deployment includes schema changes since the | |
base of the django-1.7 upgrade branch. | |
You need to re-create django (core) migrations periodically since you can't merge | |
south migrations into core migrations. | |
(Assumes commands are run from root of project and that apps are top-level directories Adjust pathing if that is not the case.) |
This file contains hidden or 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/python | |
import pyinotify, sys, os, signal, threading, time, syslog | |
lastEventTime = None | |
def iswatched(path): | |
return (path.endswith(".tmpl") or path.endswith(".py")) | |
def callback(evt): |