Skip to content

Instantly share code, notes, and snippets.

@JasperV
JasperV / prepare.sh
Created October 12, 2019 13:27
create bootable macOs drive (Catalina)
sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/Install\ macOS\ Mojave -- /Applications/Install\ macOS\ Catalina.app
@JasperV
JasperV / .gitignore
Created June 19, 2019 12:02
.gitignore
# Dependencies
/node_modules
# IDEs and editors
.idea/*
!.idea/runConfigurations/
!.idea/codeStyleSettings.xml
.project
.classpath
.c9/
rm -rf .{,_.}{fseventsd,Spotlight-V*,Trashes}
mkdir .fseventsd
touch .fseventsd/no_log .metadata_never_index .Trashes
@JasperV
JasperV / ddns.sh
Last active June 4, 2020 13:51
CloudFlare DDNS Updater
#!/bin/bash
TOKEN=""
ZONE=""
RECORD=""
ENDPOINT="https://api.cloudflare.com/client/v4/zones/$ZONE/dns_records/$RECORD"
AUTHHEADER="Authorization: Bearer $TOKEN"
KEYHEADER="X-Auth-Key: $TOKEN"
CONTENTHEADER="Content-Type: application/json"
@JasperV
JasperV / setUserAgent.js
Created July 10, 2017 08:48
set userAgent
function setUserAgent( window, userAgent ) {
if ( userAgent !== window.navigator.userAgent ) {
let userAgentProp = { get: function() { return userAgent } }
try {
Object.defineProperty( window.navigator, 'userAgent', userAgentProp )
} catch( e ) {
window.navigator = Object.create( navigator, { userAgent: userAgentProp } )
}
}
return window.navigator.userAgent
@JasperV
JasperV / .editorconfig
Last active August 5, 2024 13:05
Default EditorConfig
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 80