Skip to content

Instantly share code, notes, and snippets.

View ITSecMedia's full-sized avatar
🃏
If anything is worth doing, do it with all your heart. --Buddha

Norman Eckstein ITSecMedia

🃏
If anything is worth doing, do it with all your heart. --Buddha
View GitHub Profile
# author: eterna1_0blivion & soredake
# Get a link to the Registration Entries file
$link = "https://gist.github.com/eterna1-0blivion/70c1e5b14c7cfa8c6b6d574eb38fd27e/raw/context_pwsh_fix.reg"
# Install them into Registry using PowerShell
Invoke-WebRequest -Uri "$link" -OutFile "$env:TEMP/context_pwsh_fix.reg"
reg import "$env:TEMP/context_pwsh_fix.reg"
# Notify the user before exiting the program
@pesterhazy
pesterhazy / promises-cljs.md
Last active June 10, 2024 23:37
Promises in ClojureScript

Chaining promises

Chaining promises in ClojureScript is best done using the thread-first macro, ->. Here's an example of using the fetch API:

(-> (js/fetch "/data")
    (.then (fn [r]
             (when-not (.-ok r)
               (throw (js/Error. "Could not fetch /data")))
             (.json r)))
@akovantsev
akovantsev / cursive-shadow-cljs-repl-setup.md
Last active August 30, 2024 02:44
Setting up shadow-cljs cljs REPL in Cursive
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eviltester
eviltester / gist:11093f0e4c501a41990e227393184eda
Last active November 9, 2024 17:41
uncheck twitter interests
var timer=100;document.querySelectorAll("div > input[type='checkbox']:checked").forEach((interest) => {setTimeout(function(){interest.click()},timer);timer+=2000;});

My LambdaConf experience

I just finished an incredible (and exhausting) week at LambdaConf in Boulder, Colorado. I can say with confidence that it's the best programming conference I've attended, and I'm anxious to be able to attend it again in the future.

Stepping outside my comfort zone

I wouldn't call myself terribly experienced - 28 years old and only 4 years out of college - but I have developed a professional comfort in a few areas:

  • Interacting with F# developers
  • Interacting with C# developers
@Dzoukr
Dzoukr / Dapper.Extensions.fs
Last active June 19, 2021 01:50
F# extensions for Dapper
module Dapper.Extensions
open System
open System.Data.SqlClient
open Dapper
let extractValue (x:obj) =
match x with
| null -> null
| _ -> match x.GetType().GetProperty("Value") with
87 luminus: a template for creating Luminus applications
7 mala: A Leiningen template for Mala
1 maple: A leinginen template with MPL
3 mesos-framework: A template for setting up mesos-frameworks using component.
3 mies-brepl: A minimal ClojureScript project template with REPL
7 mies-node: A minimal ClojureScript Node.js project template
27 mies-om: A minimal Om project template
2 mies-weasel: A minimal ClojureScript project template with Weasel REPL, forked from mies.
40 mies: A minimal ClojureScript project template
3 mies: FIXME: write description
Import-Module -Name D:\Temp\ACME-posh\ACMEPowerShell.psd1
$domain = "mydomain.com"
$certificiatePassword = "abcd1234"
$email = "[email protected]"
$vault = "D:\Vault\{0}\{1}" -f $domain, [guid]::NewGuid()
mkdir $vault
cd $vault
Initialize-ACMEVault -BaseURI https://acme-v01.api.letsencrypt.org/
New-ACMERegistration -Contacts mailto:$email
@swlaschin
swlaschin / ConstrainedTypesExamples.fsx
Last active November 5, 2024 23:28
Examples of creating constrained types in F#
// General hints on defining types with constraints or invariants
//
// Just as in C#, use a private constructor
// and expose "factory" methods that enforce the constraints
//
// In F#, only classes can have private constructors with public members.
//
// If you want to use the record and DU types, the whole type becomes
// private, which means that you also need to provide:
// * a constructor function ("create").