Skip to content

Instantly share code, notes, and snippets.

View neophiliac's full-sized avatar

Kurt Sussman neophiliac

View GitHub Profile
@neophiliac
neophiliac / command
Created November 29, 2012 01:40
sed command
sed -r 's/(GPSLo.*\nGPSL)at/\1ong/M' t.csv
#!/usr/bin/env bash
version="1.7.7"
pcre_version="8.36"
openssl_version="1.0.1j"
libressl_version="2.1.1"
pagespeed_version="1.9.32.1"
set -e
/home/vagrant/.rbenv/versions/1.9.3-p429/bin/ruby -S rspec ./spec/controllers/home_controller_spec.rb ./spec/helpers/application_helper_spec.rb ./spec/models/comment_spec.rb ./spec/models/email_parser_spec.rb ./spec/models/message_spec.rb ./spec/models/stories_paginator_spec.rb ./spec/models/story_repository_spec.rb ./spec/models/story_spec.rb ./spec/models/user_spec.rb ./spec/models/vote_spec.rb
/home/vagrant/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/activesupport-4.1.12/lib/active_support/dependencies.rb:247:in `require': cannot load such file -- awesome_print (LoadError)
from /home/vagrant/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/active from /home/vagrant/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1065:in `block in load_spec_files'
from /home/vagrant/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1065:in `each'
from /home/vagrant/.rbenv/versio
@neophiliac
neophiliac / README.md
Created November 11, 2016 22:00 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


Index:

Keybase proof

I hereby claim:

  • I am neophiliac on github.
  • I am kurtsussman (https://keybase.io/kurtsussman) on keybase.
  • I have a public key ASCFyeTvYar58oPDGiWPpcEpOdmfu0ifHnz_ZGl60lNyrgo

To claim this, I am signing this object:

@neophiliac
neophiliac / https.go
Created January 8, 2018 01:37 — forked from kennwhite/https.go
Simple https http/2 static web server with HSTS & CSP (A+ SSLLabs & securityheaders.io rating) in Go using LetsEncrypt acme autocert
package main
import (
"crypto/tls"
"golang.org/x/crypto/acme/autocert"
"log"
"net"
"net/http"
)
@neophiliac
neophiliac / dmbackup.sh
Created January 31, 2018 18:45
simple backup script for docker database container - to be run from cron
#!/bin/sh
cd ~/backups
MYSQL_CONTAINER_ID=`(docker ps | grep mysql | awk '{print $1}')`
NOW=`date "+%Y-%m-%dT%H_%M_%S"`
docker exec $MYSQL_CONTAINER_ID /usr/bin/mysqldump -u root --password=3dodPaTXF5 --opt mediawiki > backup_$NOW.sql
#this assumes that there is only one mysql container and that it has 'mysql' in its name
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)
@neophiliac
neophiliac / ublock_custom_scripts.js
Created April 9, 2022 20:57 — forked from varenc/ublock_custom_scripts.js
uBlock origin custom scripts
# Expires: 5 minutes
# License: See source for license and credits
nano-tiny-noopvast-2.0 text/xml
<VAST version="2.0"></VAST>
disable-webassembly.js application/javascript
(function() {
delete WebAssembly;
console.log('CV SAYS: WebAssembly deleted')
@neophiliac
neophiliac / AuthyToOtherAuthenticator.md
Created January 22, 2023 22:34 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My guess is that Brian used the