Both things have been introduced recently, and let you access even private ec2 instances
- Without VPN
- No open SSH port
- Authentication / Authorization is fully delegated to IAM
# Assumes valid AWS Credentials in ENV
#!/usr/bin/perl | |
use strict; | |
my $action = ''; | |
my $filename = '-'; | |
for my $arg (@ARGV){ | |
if ($arg eq "-e" or $arg eq "--export"){ | |
$action = 'export'; |
#coding:utf-8 | |
import psutil | |
from mpl_toolkits.mplot3d import Axes3D | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
TIME_NUM = 90 | |
FRAMES = 360 |
! XTerm resources | |
! | |
! Remember to run `xrdb < .Xresources` after changing anything. | |
! | |
! Tavis Ormandy <taviso@gmail.com> | |
! Set the default UI font (menus, toolbar, etc) | |
XTerm*XftFont: Segoe UI:size=10:antialias=true:style=Regular | |
! Color of UI Components |
Great book! Here are my quiz notes: | |
- What is the diff bt raise and fail? | |
=> no diff | |
- Are raise//fail ruby keywords or methods? | |
=> Kernel#raise (are methods) | |
- Re-raise last exception | |
=> |
Both things have been introduced recently, and let you access even private ec2 instances
# Assumes valid AWS Credentials in ENV
job_name=debug-`date +%Y%m%d%H%M%S` | |
kubectl create job ${job_name} --from cj/myveeva-v118273-app-maint | |
kubectl label pod -l job-name=${job_name} run=debug | |
kubectl wait --for condition=Ready pod -l job-name=${job_name} | |
pod_name=`kubectl get pods -l job-name=${job_name} -o jsonpath='{.items[0].metadata.name}'` | |
echo "installing tools" | |
kubectl exec ${pod_name} -- sh -c "apk -q update; apk -q add bash curl jq openssh rsync vim unzip postgresql-client; pip install -q ipython" |
//////////////////////////////////////////////// | |
// Protractor Browser Capabilities Extensions // | |
//////////////////////////////////////////////// | |
"use strict"; | |
module.exports = browser.getCapabilities().then(function(s) { | |
var browserName, browserVersion; | |
var shortName, shortVersion; | |
var ie, ff, ch, sa; | |
var platform; |
/** | |
* Actively wait for an element present and displayed up to specTimeoutMs | |
* ignoring useless webdriver errors like StaleElementError. | |
* | |
* Usage: | |
* Add `require('./waitReady.js');` in your onPrepare block or file. | |
* | |
* @example | |
* expect($('.some-html-class').waitReady()).toBeTruthy(); | |
*/ |
// Explain what the Function.prototype.bind method allows. | |
// Use properly to fix this TypeError: Illegal invocation | |
var myLog = console.log; | |
myLog("hola"); | |
=> | |
// The bind method allows us to create a new function which is permanently bound to a given value of `this` | |
var myLog = console.log.bind(console); | |
myLog("hola"); //==> "hola" | |
// As a bonus, you can't override its `this` value using call or apply. | |
myLog.call(window, "hello"); // will be ignored and will keep bound to console.log() |
"use strict"; | |
var maxWaitTimeoutMs = 5000; // 5secs | |
var webdriver = require('selenium-webdriver'); | |
var flow = webdriver.promise.controlFlow(); | |
/** | |
* Custom Jasmine matcher builder that waits for an element to have | |
* or not have an html class. | |
* @param {String} expectation The html class name |