A collection of docker online resources. Source
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
"""Fetching the latest GMail email using OAuth 2 and IMAP. | |
Requires requests-oauthlib, which is available on pypi. | |
Includes a basic SASL XOAUTH2 authentication method for imaplib. | |
""" | |
# Credentials you get from registering a new web application in Google API Console | |
client_id = 'your-id.apps.googleusercontent.com' | |
client_secret = 'your secret' | |
redirect_uri = 'your callback uri' |
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
#!/bin/bash | |
BASE_DIR=${TMPDIR:-/var/tmp} | |
ORIG_DIR=$PWD | |
HASH_CMD="md5sum" | |
DIR_NAME=`echo $PWD | $HASH_CMD | cut -f1 -d " "` | |
TMP_DIR=$BASE_DIR/$DIR_NAME | |
mkdir -p $TMP_DIR |
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
#ifdef GL_ES | |
#define LOWP lowp | |
#define MED mediump | |
#define HIGH highp | |
precision mediump float; | |
#else | |
#define MED | |
#define LOWP | |
#define HIGH | |
#endif |
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
# Path to boto config file, needed by gsutils | |
BOTO_CONFIG="/etc/boto.cfg" | |
# Path in which to create the backup (will get cleaned later) | |
BACKUP_PATH="/mnt/data/dump/" | |
# DB name | |
DB_NAME="mydatabase" | |
# Google Cloud Storage Bucket Name |
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
haproxy.conf | |
============ | |
frontend spdy | |
mode tcp | |
bind xxx.xxx.xxx.xxx:443 ssl crt /etc/haproxy/ssl.pem crt /etc/haproxy/certs.d npn spdy/3.1,http/1.1 ciphers AES256+EECDH:AES256+EDH:AES128+EDH:EECDH:!aNULL:!eNULL:!LOW:!DES:!3DES:!RC4; no-sslv3 | |
option tcplog | |
log global | |
# route to nginx |
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
- Open Automator | |
- File -> New -> Service | |
- Change "Service Receives" to "files or folders" in "Finder" | |
- Add a "Run Shell Script" action | |
- Change "Pass input" to "as arguments" | |
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
- Save it as something like "Open in Visual Studio Code" |
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
require('./module.js') // { a: 1 } | |
import module from './module.js' // undefined | |
import { a } from './module.js' // 1 | |
require('./module2.js') // { default: { a: 1 }, b: 2 } | |
import module2 from './module2.js' // { a: 1} | |
import { b } from './module2.js' // 2 | |
require('./module3.js') // { default: { a: 1 }, b: 2 } |
%title: Kubeception %author: @dghubble
// Youtube: https://www.youtube.com/watch?v=tlUiQa2JYQU
-> Experiments with QEMU/KVM on Kubernetes <-
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
OlderNewer