Skip to content

Instantly share code, notes, and snippets.

View burn2delete's full-sized avatar
:octocat:
Building an open-source world....

Matt Ratzke burn2delete

:octocat:
Building an open-source world....
View GitHub Profile
@burn2delete
burn2delete / isEmpty.ts
Last active December 23, 2023 17:07
Utilities written in Typescript
/**
* Checks if the given value is null or undefined.
*
* @param {any} value - The value to check.
* @returns {boolean} - Returns true if the value is null or undefined, false otherwise.
*/
const isNullOrUndefined = (value: any): boolean => value === null || value === undefined;
/**
* Checks if the given value is an array.
@burn2delete
burn2delete / Compare-ITGluePasswordsHIBP.ps1
Created February 27, 2019 22:09
ITGlue Passwords HIBP
###
# https://gcits.com/knowledge-base/check-it-glue-passwords-against-have-i-been-pwned-breaches/
###
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$key = "ENTERAPIKEYHERE"
$ITGbaseURI = "https://api.itglue.com"
$headers = @{
@burn2delete
burn2delete / New-TenantSecureScore.ps1
Last active February 27, 2019 18:13
Generate O365 Tenante Secure Score
###
# SOURCE: https://gcits.com/knowledge-base/export-customers-microsoft-secure-scores-to-csv-and-html-reports/
###
# This script needs to be run by an admin account in your Office 365 tenant
# This script will create an Azure AD app in your organisation with permission
# to access resources in yours and your customers' tenants.
$externalCSS = "<link rel=`"stylesheet`" href=`"https://dl.dropbox.com/s/vpx9ysgr11cah4u/reports.css?dl=0`">"
$yourLogo = "https://gcits.com.au/wp-content/uploads/GCITSlogowordpress.png"
@burn2delete
burn2delete / spec.cljs
Last active June 7, 2017 10:20
Use data to validate data.
;; Basic Specs ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(spec/def ::fn fn?)
(spec/def ::any any?)
(spec/def ::map map?)
(spec/def ::nil nil?)
(spec/def ::set set?)
@burn2delete
burn2delete / index.cljs.hl
Created February 9, 2017 07:03
Hoplon/Bidi Index file
(page "index.html"
(:require [hoplon.bidi]
[app.views :as view]
[app.routing :as routing])
(:require-macros [hoplon.bidi :refer [route-tpl]]))
(html
(head
(html-meta :http-equiv "content-type" :content "text/html; charset=utf-8")
(html-meta :name "viewport" :content "width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=0")
@burn2delete
burn2delete / client.cljs
Created February 9, 2017 04:59
CLJS/Feathers.js Client
(ns app.client
(:require [cljsjs.socket-io]
[goog.object :as obj]
[feathers.client :as feathers]
[feathers.client.services :as svc]))
;; Feathers Client ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def app (feathers/feathers))
@burn2delete
burn2delete / server.cljs
Last active February 9, 2017 05:05
CLJS/Feathers.js Server
(ns app.server
(:require [feathers.app :as feathers]
[app.services :as services]))
(enable-console-print!)
(def app (feathers/feathers))
(def public (str js/__dirname "/../../"))
@burn2delete
burn2delete / build.boot
Created December 25, 2016 22:40
Hoplon/Feathers.js require and task options
(require
'[adzerk.bootlaces :refer :all]
'[adzerk.boot-cljs :refer :all]
'[degree9.boot-semver :refer :all]
'[degree9.boot-nodejs :refer :all]
'[feathers.boot-feathers :refer :all]
'[hoplon.boot-hoplon :refer :all])
(task-options!
cljs {:source-map true
@burn2delete
burn2delete / build.boot
Created December 25, 2016 22:30
Hoplon/Feathers Boot Task
(deftask develop
"Build Hoplon/Feathers.js for local development."
[]
(comp
(feathers)
(watch)
(hoplon)
(nodejs :init-fn 'app.server/init)
(cljs)
(target)
@burn2delete
burn2delete / build.boot
Created December 25, 2016 18:38
Default build.boot file
(set-env!
:dependencies '[[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/clojurescript "1.9.293" :scope "provided"]
[adzerk/boot-cljs "1.7.228-2" :scope "test" ]
[adzerk/bootlaces "0.1.13" :scope "test" ]
[degree9/boot-semver "1.3.6" :scope "test" ]]
:source-paths #{"src"}
:resource-paths #{"resources"}
:asset-paths #{"assets"})