Skip to content

Instantly share code, notes, and snippets.

View tallpeak's full-sized avatar

Aaron William West tallpeak

View GitHub Profile
@mencargo
mencargo / postgresql.md
Last active November 1, 2024 11:43
PostgreSQL Queries

Useful PostgreSQL Queries & Commands

All sizes in MB, change /1024/1024 to /1024/1024/1024 for GB.

Databases sizes

Without system databases

select
datname as database,
(pg_database_size(datname)/1024/1024) as size
@Gabriella439
Gabriella439 / Main.hs
Created April 8, 2021 00:53
Example use of GHC generics to derive datatype parser
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE EmptyDataDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
@anonymous1184
anonymous1184 / AppVol.ahk
Last active November 22, 2024 00:07
AppVol()
#Requires AutoHotkey v2.0
AppVol(Target := "A", Level := 0) {
if (Target ~= "^[-+]?\d+$") {
Level := Target
Target := "A"
} else if (SubStr(Target, -4) = ".exe") {
Target := "ahk_exe " Target
}
try {
@DarinM223
DarinM223 / typeclassses.md
Last active March 31, 2023 03:35
Typeclasses in Haskell, Scala, and Rust

Type classes

Type classes have some advantages over Java style interfaces. One advantage is the ability to implement functions that do not need to take in an instance of the interface.

For example, (FromString v) takes in a String and returns v, and it doesn't have to take v as a parameter.

@isaksky
isaksky / Working-with-SQL-syntax-trees-in-F.md
Last active June 25, 2021 19:21
Working with SQL syntax trees in F#

Working with SQL syntax trees in F#

Update 12/15/2016 - Added Sql generation

Welcome to my blog post for #FsAdvent 2016.

If you're using a relational database, as your application grows in size, at some point you may find yourself looking for an SQL parser. This can give you lots of leverage, for example allowing you to:

  • Do permission checks on queries before executing them
  • Rewrite incorrect or inefficient queries
@roblogic
roblogic / SysEnv.ahk
Created November 21, 2016 01:51
Editing Windows PATH with AutoHotKey
#SingleInstance, Force
#NoEnv ; somewhat ironic...
; this won't work in vista/7 if it's not run as an administrator.
; i'm too lazy to request it manually so the easiest way is to
; compile this script, and then under Compatibility tab in the
; compiled exe's Properties select "Run as Administrator"
RegRead, P, HKLM, SYSTEM\CurrentControlSet\Control\Session Manager\Environment, PATH
@sigrlami
sigrlami / ab.md
Last active October 2, 2024 18:14
List of companies using Haskell https://haskellcosm.com

WARNING This list outdated, for the up to date version visit https://haskellcosm.com

List of companies that use Haskell in Production

Types of work:

  • RD - research&development
  • PR - product
  • IP - in-house product
  • CO - consulting