-
Disable and stop the systemd-resolved service:
sudo systemctl disable systemd-resolved.service sudo systemctl stop systemd-resolved
-
Then put the following line in the
[main]
section of your/etc/NetworkManager/NetworkManager.conf
:
This file contains 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
# Example of using an InitContainer in place of a GitRepo volume. | |
# Unilke GitRepo volumes, this approach runs the git command in a container, | |
# with the associated hardening. | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: git-repo-demo | |
annotations: | |
seccomp.security.alpha.kubernetes.io/pod: 'docker/default' | |
spec: |
This file contains 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
# FFMPEG example of Blocking Mode Audio I/O https://people.csail.mit.edu/hubert/pyaudio/docs/ | |
"""PyAudio Example: Play a wave file.""" | |
import pyaudio | |
import wave | |
import sys | |
import subprocess | |
CHUNK = 1024 |
This file contains 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 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
using Amazon; | |
using Amazon.CognitoIdentityProvider.Model; | |
using System.Threading.Tasks; | |
public class SignUpCognitoUserPoolSample | |
{ | |
public async Task SignupCognitoUserIntoUserPoolAsync() | |
{ | |
// Identify your Cognito UserPool Provider | |
using(var provider = new Amazon.CognitoIdentityProvider.AmazonCognitoIdentityProviderClient(RegionEndpoint.USEast1)) |
This file contains 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
# Requires pydub (with ffmpeg) and Pillow | |
# | |
# Usage: python waveform.py <audio_file> | |
import sys | |
from pydub import AudioSegment | |
from PIL import Image, ImageDraw | |
Only uses modules included in AciveState basic install. Created as a function that can be imported or run.
Forked Gist from:
- fork using Hurl.it
- https://gist.github.com/eteq/1750715
- http://stackoverflow.com/a/11621536
See:
This file contains 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
using UnityEditor; | |
using System; | |
using System.Collections.Generic; | |
class BuildScript { | |
static string[] SCENES = FindEnabledEditorScenes(); | |
static string APP_NAME = "AngryBots"; | |
static string TARGET_DIR = "target"; |
This file contains 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
# install openjdk | |
sudo apt-get install openjdk-7-jdk | |
# download android sdk | |
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz | |
tar -xvf android-sdk_r24.2-linux.tgz | |
cd android-sdk-linux/tools | |
# install all sdk packages |
This file contains 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
Param ( | |
[string]$SubjectName = $env:COMPUTERNAME, | |
[int]$CertValidityDays = 365, | |
$CreateSelfSignedCert = $true | |
) | |
#region function defs | |
Function New-LegacySelfSignedCert | |
{ |
NewerOlder