Skip to content

Instantly share code, notes, and snippets.

@emleddin
emleddin / 1-ANKI-remote.md
Last active March 28, 2024 23:55
Instructions for using the 8BitDo Zero 2 with ANKI on Linux and MacOS

Using the 8BitDo Zero 2 Remote with ANKI

The 8BitDo Zero 2 remote is ~$20 and can be used to gamify your studying.

See controller image below

The controller comes with preset keybindings that aren’t the most helpful. So, through the use of a key remapping software, you’ll update how your device interprets the keys!

If you don’t want to download a remapper, you should be able to use an

@bennyrw
bennyrw / generateAwsCredsFile.js
Created September 23, 2022 09:53
Generate AWS credentials file content from SSO
//
// Intended to be used as a bookmarklet that is executed when on the AWS Single Sign-On landing page,
// this script scans the named SSO application and its accounts (specified below) and generates the
// ~/.aws/credentials content and copies it to the clipboard ready to be used.
//
// the SSO application to use
const APPLICATION_TITLE = "AWS Account";
// specify the names of the accounts to include (case sensitive). Any that are not found will be ignored.
@rams3sh
rams3sh / aws_regex_cheat_sheet
Last active February 28, 2024 14:06
Common AWS Related Regex (AWS)
ARN Base Pattern :-
arn:<aws_parition>:<aws_service>:[<aws_region>]:<account_id>:<root | resource_type>:/<resource_name>[/<sub_resource_names>...]
i. <aws_partition>
Regex - (aws|aws-us-gov|aws-cn)
ii. <aws_service> - No fixed pattern
iii. <aws_region> - No fixed pattern
Most of the regions occur in combination of 2 letter followed by "-" followed by a combination of direction based word , followed by a "-" and then a digit.
@PolarBearGG
PolarBearGG / google_redirect_remove.js
Created January 17, 2020 14:59 — forked from zachbrowne/google_redirect_remove.js
Userscript to remove URL redirection from google sites
// ==UserScript==
// @name Google Redirect Remove
// @id google_redirect_remove
// @namespace scripts.zachbrowne.com
// @description Remove URL redirection from google sites
// @license GPL v3
// @include *://www.google.*/*q=*
// @include *://www.google.*/*tbs=*
// @include *://www.google.*/search?*
// @include *://www.google.*/webhp?*
@neurogenesis
neurogenesis / terraforming-import-all
Created September 27, 2019 22:28
generate terraform templates from existing infrastructure (via terraforming)
#!/usr/bin/env ruby
# USAGE:
# gem install terraforming
# export AWS_PROFILE=xxx
# mkdir -p ~/projects/terraform
# cd ~/projects/terraform
# mkdir -p imports/[account]/[region]
# cd imports/[account]/[region]
# ../../../bin/terraforming-import-all
@ajorpheus
ajorpheus / gist:3382de02fd569cd27071eb9ab681ca1f
Last active January 30, 2019 19:27 — forked from kevinhooke/gist:d2eabbd402741ae728ef6ab2985dfddd
Using Docker on Windows with Cisco AnyConnect VPN in non-split tunnel mode
@vatshat
vatshat / cwl_insights_parse_regex.sh
Created January 29, 2019 18:25
An example of how to use regex in the parse statement of a CloudWatch Insights query
#!/usr/bin/env bash
query_string=$(cat << EndOfMessage
fields @timestamp, @logStream, headers.X-Amzn-Trace-Id, @transId, @message
| parse @message /(transactionId:[ ]?)(?<@transId>[a-zA-Z0-9]+)/
| filter @transId = a4c475516be5445a87fbb81bb7a4b365
EndOfMessage
) \
&& \
query_id=`aws logs start-query --log-group-name /aws/lambda/console_log \
@mikepruett3
mikepruett3 / shell-setup.ps1
Last active April 16, 2024 22:19
Packages to install via scoop, winget, choco, and other tools...
<#
.SYNOPSIS
Script to Initialize my custom powershell setup.
.DESCRIPTION
Script uses scoop
.NOTES
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
@pkazi
pkazi / cloudTrailEventNames.list
Last active March 23, 2024 09:37
List of values for parameter EventName in AWS Cloudtrail events
AbortDocumentVersionUpload
AbortEnvironmentUpdate
AbortMultipartUpload
AbortVaultLock
AcceptAccountMapping
AcceptCertificateTransfer
AcceptDelegate
AcceptDirectConnectGatewayAssociationProposal
AcceptFxPaymentCurrencyTermsAndConditions
AcceptHandshake
@nicksmarto
nicksmarto / makeTodo.js
Created October 13, 2017 21:19
Google Aps Script for Sheets to automatically pull, format, sort and populate active Todoist tasks in to Google Sheet
//*********************************************************************************************************
//makeTodo: Call other functions to make the daily Todo
//*********************************************************************************************************
function makeTodo(){
//Populate Header
grabHeader("B1")
//Populate Task List