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
#! ruby | |
require 'optparse' | |
require 'fileutils' | |
# Usage: pluralsight-course-dl.rb --input file.txt --output ~/Videos -u username -p password | |
# file.txt contains a list of urls that youtube-dl can donwload. | |
Options = {} |
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
# debugging AWS bastion connectivity issue | |
Sat. Nov 11 2017 | |
Today I was setting up a public subnet bastion server to access instances on my private subnet. I was able to ssh on to the bastion server but was unable to establish ssh connection from the bastion instance to the private instance. | |
Any suggestions? And what could I do to improve or facilitate debugging similar problems in the future? | |
Here's my setup in a concise form: |
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
[TOC] | |
> additional important docs: [config references](https://github.com/docker/notary/tree/master/docs/reference) | |
## 0) Setting up DB(s) | |
1. Simply boot up two database instances (`i1` for server and `i2` for signer). | |
2. create a database named `notaryserver` on `i1` and create `notarysigner` on `i2`. | |
3. run SQL commands from [here](https://github.com/docker/notary/tree/master/migrations) | |
4. later configure the database urls in the `server-config.json` and `signer-config.json` |
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
{ | |
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjeWNtb3RvIiwiaWF0IjoxNDk2NzY2OTM5LCJleHAiOjE1MjgzMDI5MzUsImF1ZCI6IiIsInN1YiI6IiIsImp0aSI6ImZNYUpKd0h2VlBhVnN0SDdnUGU0In0.MQoVc45jLFxxnM8xeXUwc_bpMuNX6eidw2iJshlkXWY", | |
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjeWNtb3RvIiwiaWF0IjoxNDk2NzY2OTM5LCJleHAiOjE1MjgzMDI5MzUsImF1ZCI6IiIsInN1YiI6IiIsImp0aSI6ImZNYUpKd0h2VlBhVnN0SDdnUGU0In0.MQoVc45jLFxxnM8xeXUwc_bpMuNX6eidw2iJshlkXWY", | |
"issued_at": "2017-06-06T16:34:56.875816886Z" | |
} |
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
import random | |
import string | |
import urllib.request | |
import time | |
class UrlGen : | |
def __init__(self, max = 1000, prefix = "" , charLen = 6): | |
self.max = max | |
self.current = 0 |
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
public class MainActivity extends | |
private PopupWindow popWindow; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
} |
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
//clone | |
var clone = function (old) { | |
var my = {}, key ; | |
for (key in old){ | |
my[key] = old[key]; | |
} | |
return my ; | |
} |
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
//javascript private variable | |
var counterCreater = function() { | |
// constructor | |
function Counter () { | |
var count = 0 ; // private | |
this.inc = function () { | |
count++; | |
console.log("inc:" + count); | |
} | |
this.get = function(){ |
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 System; | |
using System.Management; | |
using System.Security.Cryptography; | |
using System.Security; | |
using System.Collections; | |
using System.Text; | |
namespace Security | |
{ | |
/// <summary> | |
/// Generates a 16 byte Unique Identification code of a computer |
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
<link rel="import" href="../ace-element/ace-element.html"> | |
<link rel="import" href="../topeka-elements/category-images.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icons/av-icons.html"> | |
<link rel="import" href="../paper-fab/paper-fab.html"> | |
<polymer-element name="my-element"> | |
<template> |
NewerOlder