Skip to content

Instantly share code, notes, and snippets.

View ruandre's full-sized avatar

Ruandré Janse van Rensburg ruandre

View GitHub Profile
@ruandre
ruandre / document-mime-types.txt
Last active October 22, 2019 17:55
Document mime types (excludes templates)
application/doc
application/msword
application/rtf
application/vnd.ms-word.document.macroEnabled.12
application/vnd.oasis.opendocument.text
application/vnd.openxmlformats-officedocument.wordprocessingml.document
application/x-abiword
application/x-iwork-pages-sffpages
application/x-rtf
application/x-soffice
@ruandre
ruandre / .alacritty.yml
Last active June 18, 2021 16:35
Alacritty Settings
# https://github.com/alacritty/alacritty
TERM: xterm-256color
window:
dimensions:
columns: 147
lines: 37
@ruandre
ruandre / boiler.html
Last active September 21, 2021 19:08
HTML Boilerplate
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title></title>
<!-- <meta name="robots" content="noindex,nofollow"> -->
<meta name="description" content="">
<meta name="theme-color" content="#fff">
@ruandre
ruandre / create-and-submit-form-programmatically.js
Last active December 19, 2021 07:34
Create and submit form programmatically
// useful when a 'followed' redirect needs to happen, etc.
// https://github.com/insin/get-form-data
function $forEach(arr, cb) {
var arrLen = arr.length
for (var i = 0; i < arrLen; i++) cb(arr[i])
}
function $form(action, method, fields) {
var form = document.createElement('form')
@ruandre
ruandre / settings.json
Last active February 7, 2022 16:10
Windows Terminal
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions": [
{
"command": {
"action": "copy",
"singleLine": false
},
"keys": "ctrl+c"
@ruandre
ruandre / target-blank.html
Last active February 7, 2022 17:02
target blank security
<!--
https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/
https://medium.com/sedeo/how-to-fix-target-blank-a-security-and-performance-issue-in-web-pages-2118eba1ce2f
https://blog.dareboost.com/en/2017/03/target-blank-links-rel-noopener-performance-security/
-->
<a href="#" target="_blank" rel="noopener noreferrer">Link</a>
@ruandre
ruandre / aws-cli-dynamodb-scan.sh
Last active February 7, 2022 17:06
AWS CLI DynamoDB Scan
# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
# https://docs.aws.amazon.com/cli/latest/index.html
# https://stedolan.github.io/jq/
aws dynamodb scan \
--table-name tableName \
--profile dev \
--page-size 5 | jq .Items[] | jq {field1:.field1.S,field2:.field2.S} | json2csv
@ruandre
ruandre / user-select.css
Last active February 7, 2022 17:30
Disable annoying highlight/select on click
/*
Disable annoying highlight/select on click
https://css-tricks.com/almanac/properties/u/user-select/
*/
.button {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@ruandre
ruandre / sublime-text-settings.md
Last active February 7, 2022 17:48
Sublime Text Settings

Sublime Text Settings

https://www.sublimetext.com/

Preferences.sublime-settings.json

{
  "always_prompt_for_file_reload": true,
  "bold_folder_labels": true,