Skip to content

Instantly share code, notes, and snippets.

View electblake's full-sized avatar
🧙

Blake E electblake

🧙
View GitHub Profile
@electblake
electblake / nordvpn-socks-servers.sh
Last active May 16, 2024 04:14
list and search socks servers using nordvpn api
#!/bin/bash
# Fetch data from API and store it in a variable
data=$(curl --silent --globoff "https://api.nordvpn.com/v1/servers?filters[servers_technologies][identifier]=socks&limit=0" | \
jq '[.[] | {
name: .name,
created_at: .created_at,
hostname: .hostname,
ip: .station,
load: .load,
@electblake
electblake / 202403201414 AWS Transit Gateway for NordLayer VPN.md
Created March 20, 2024 18:14
202403201414 AWS Transit Gateway for NordLayer VPN.md

AWS Transit Gateway for NordLayer VPN

To set up an AWS Transit Gateway in the us-east-2 region and integrate it with your specific AWS resources, here's a step-by-step guide with direct links to the AWS Management Console where applicable:

Step 1: Create a Transit Gateway

  1. Navigate to the VPC Dashboard in the AWS Management Console for the us-east-2 region: VPC Dashboard.
  2. Click on "Transit Gateways" on the left sidebar, then click the Create Transit Gateway button.
  3. Configure the Transit Gateway:
  • Name tag: Enter a meaningful name, e.g., NorthOneDevTransitGateway.
@electblake
electblake / GitHubFileDownloader.sh
Last active March 7, 2024 23:31
Github File Downloader
#!/bin/bash
# Script: GitHubFileDownloader.sh
# Author: electblake <https://github.com/electblake>
# Version: 1.0
# Description: This script converts a GitHub repository file URL to its GitHub API URL for file contents, checks if the user is logged into GitHub CLI, and downloads the file.
# Source: https://gist.github.com/electblake/7ef3a63e20b3c8db67d9d66f7021d727
# Credits:
# - Inspired by answers on: https://stackoverflow.com/questions/9159894/download-specific-files-from-github-in-command-line-not-clone-the-entire-repo
# - Used "Bash Script" GPT by Widenex for script creation assistance.
@electblake
electblake / custom-mosh.zsh
Last active January 25, 2024 17:39
Enhance the `mosh` command in Zsh by automatically adding default arguments.
# File: custom-mosh.zsh
# Author: electblake <github.com/electblake>
# Last Modified: 2024-01-25
# Source URL: https://gist.github.com/electblake/e150f3dc45ee0452ef3fe21fd34221e2
# Description:
# Enhances the `mosh` command in Zsh by automatically adding default arguments.
# Defaults set:
# --server "/usr/local/bin/mosh-server"
# Additional defaults can be added in future updates.
#

Keybase proof

I hereby claim:

  • I am electblake on github.
  • I am blaken (https://keybase.io/blaken) on keybase.
  • I have a public key ASC9siwuFcs9KO_nejxA_wOmhisTjmSkGdsVu83SMXODdAo

To claim this, I am signing this object:

@electblake
electblake / pylink.zsh
Last active June 28, 2018 20:23 — forked from zvoase/pylink.sh
pylink - Link and unlink Python modules to your site packages directory.
@electblake
electblake / ssh_test_certificate.sh
Created November 16, 2015 00:28
Generate self-signed test certificate - ssh commands
# taken from: http://www.akadia.com/services/ssh_test_certificate.html
openssl genrsa -des3 -out server.key 1024;
openssl req -new -key server.key -out server.csr;
cp server.key server.key.org;
openssl rsa -in server.key.org -out server.key;
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt;
@electblake
electblake / node-download-remote.js
Last active January 31, 2018 19:08
Node: Download something remote using request stream
var fs = require('fs'),
request = require('request');
module.exports = function (url, path, callback) {
request({uri: url})
.pipe(fs.createWriteStream(path))
.on('error', function(err) {
callback(err);
})
.on('close', function() {
cd ~/ffmpeg_sources
git clone --depth 1 git://git.code.sf.net/p/opencore-amr/fdk-aac
cd fdk-aac
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install
make distclean
'use strict';
angular.module('myApp')
.constant('AUTH_EVENTS', {
loginSuccess: 'auth-login-success',
loginFailed: 'auth-login-failed',
loginCancelled: 'auth-login-cancelled',
logoutSuccess: 'auth-logout-success',
logoutFailed: 'auth-logout-failed',
sessionTimeout: 'auth-session-timeout',
notAuthenticated: 'auth-not-authenticated',