Skip to content

Instantly share code, notes, and snippets.

View ntotten's full-sized avatar

Nathan Totten ntotten

View GitHub Profile
993898: QUIC_SESSION
r6---sn-jvh2vgp0h-jaul.googlevideo.com
Start Time: 2017-10-05 10:48:25.236
t=247821 [st= 0] +QUIC_SESSION [dt=12388]
--> cert_verify_flags = 6
--> host = "r6---sn-jvh2vgp0h-jaul.googlevideo.com"
--> port = 443
--> privacy_mode = true
--> require_confirmation = false
@ntotten
ntotten / certrenew.sh
Created July 29, 2017 17:12
Script to renew Let's Encrypt certificate and then replace certificate on OpenVPN server
#!/bin/bash
(
DOMAIN="vpn.example.com"
set -eu
certbot renew -q
/usr/local/openvpn_as/scripts/sacli stop
@ntotten
ntotten / certrenew.sh
Created July 29, 2017 17:12
Script to renew Let's Encrypt certificate and then replace certificate on OpenVPN server
#!/bin/bash
(
DOMAIN="vpn.example.com"
set -eu
certbot renew -q
/usr/local/openvpn_as/scripts/sacli stop
@ntotten
ntotten / authorization.sh
Created July 29, 2017 16:41
Let's Encrypt Certbot Authorization Hook for DNSimple
#!/bin/bash
(
ACCESS_TOKEN="YOUR_ACCESS_TOKEN_HERE" # See https://developer.dnsimple.com/v2/oauth/
ACCOUNT_ID="YOUR_ACCOUNT_ID"
DOMAIN="YOUR_DOMAIN"
RECORD_ID="YOUR_RECORD_ID"
if [[ ! $(type -P curl) ]] ; then
@ntotten
ntotten / README.md
Last active April 6, 2017 18:32
Change Password Webtask

Change Password Webtask

In order to use this Auth0 WebTask you simply need to follow these instructions.

You first need to create an Auth0 Client and authorize this client to call the management API;

  1. Create a new Auth0 Client called "Change Password Service"
  2. Select the type of the client to be "Non-Interactive"
  3. On the "quickstart" screen that is show select "Auth0 Management API" in the drop down. This will show a orange box that says "This client is not authorized for this API."
  4. Click the button that says to "Navigate to the API and Authorize"
  5. Toggle the "Change Password Service" to authorized.
class ViewController: UIViewController {
@IBOutlet weak var oldPassword: UITextField!
@IBOutlet weak var newPassword: UITextField!
@IBOutlet weak var confirmPassword: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
router.post('/change-password', middlewares.updateUserProfile, (req, res, next) => {
if (req.user.identities[0].isSocial) {
return sendError(400, 'Cannot update social account', next);
}
if (req.body.password !== req.body.confirm) {
return sendError(400, 'Password mismatch', next);
}
return auth0Utils.validatePassword(req.user, req.body.current)
const VARIBALES = {
lock_url: 'https://foo.com',
manage_url: 'https://manage.foo.com', // these come from env variables on the server
account: {
client_id: '{{CLIENT_ID}}',
client_secret: '{{CLIENT_SECRET}}'
},
...
}
@import url(https://fonts.googleapis.com/css?family=PT+Sans:400,700);
body, .wufoo, .wufoo label.desc, .wufoo legend.desc, .wufoo .info h2, .wufoo .info div, .wufoo input.text, .wufoo textarea.textarea, .wufoo input.file, .wufoo li div, .wufoo li span, .wufoo li div label, .wufoo li span label, .likert caption, .likert thead td, .likert tbody th label, .wufoo .section h3, .wufoo .section div, .paging-context {
font-family: "PT Sans", "Helvetica", Helvetica, Arial, sans-serif
}
#logo {
background-color: #008CBA
}
.wufoo .info h2 {
font-size: 180%
}
var lsr = require('lsr');
var path = require('path');
var fs = require('fs');
var toMarkdown = require('to-markdown');
var striptags = require('striptags');
var mkdirp = require('mkdirp');
var matter = require('gray-matter');
var toTitleCase = require('titlecase');
var beautifyHtml = require('js-beautify').html;