Skip to content

Instantly share code, notes, and snippets.

View NickSeagull's full-sized avatar
Building @neohaskell

Nick Seagull NickSeagull

Building @neohaskell
View GitHub Profile

Announcement

Please stop using this extension and Microsoft's C++ extension for Unreal code completion.

clangd

The VSCode extension clangd has blazing fast code completion in comparison. I've made a VSCode extension for it:

https://github.com/boocs/unreal-clangd

You will use clangd for code completion(Intellisense) and use Microsoft's C++ extension for Building/Debugging

@melvic-ybanez
melvic-ybanez / what-i-didnt-know-about-fp-2020.md
Last active August 1, 2024 08:25
What I Didn't Know about Functional Programming until 2020

What I Didn't Know about Functional Programming until 2020

  1. Programming using a series of transformations and aggregations, something I've been doing for years, is known as programming in the map/reduce style.
  2. The more abstract the type is, the greater its cardinality, and the smaller the set of operations it supports. So make use of universal quantifiers, particularly by implementing fully parametric functions. They guide you on how to implement their term-level definitions by narrowing down the number of possible implementations. In other words, the type system of Scala (or Haskell, for that matter) is not only great for capturing compile-time errors, but is also capable of leading you to the correct solution.
  3. You can encode union types by combining different Scala features such as type constructors, subtyping and implicits, and by taking advantage of the Curry-Howard Isomorphism and De Morgan's Laws for neg
@oneingan
oneingan / override.nix
Created January 30, 2020 21:45
zigbee2mqtt in nixos
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem}:
let
nodePackages = import ./default.nix {
inherit pkgs system;
};
in
nodePackages // {
@joshtynjala
joshtynjala / profiles.json
Created August 8, 2019 15:46
Ayu color schemes for Windows Terminal
{
"schemes" :
[
{
"background" : "#fafafa",
"black" : "#000000",
"blue" : "#3199e1",
"brightBlack" : "#686868",
"brightBlue" : "#399ee6",
"brightCyan" : "#4cbf99",
-- a component
data FileSystem m = FileSystem {
exists :: Path -> m (Either Text Bool)
, readFile :: Path -> m (Either Text Text)
}
-- a constructor for a mock file system
newFileSystemWith :: (FileSystemValues -> FileSystemValues) -> FileSystem
newFileSystemWith f = FileSystem {
exists = \_ -> pure (_exists $ f fileSystemValues)
@FradSer
FradSer / iterm2_switch_automatic.md
Last active October 8, 2024 12:39
Switch iTerm2 color preset automatic base on macOS dark mode.

The latest beta (3.5) includes separate color settings for light & dark mode. Toggling dark mode automatically switches colors.

Vist iTerm2 homepage or use brew install iterm2-beta to download the beta. Thanks @stefanwascoding.


  1. Add switch_automatic.py to ~/Library/ApplicationSupport/iTerm2/Scripts/AutoLaunch with:
@ryandaniels
ryandaniels / firefox-user.js
Last active December 13, 2024 10:53
Firefox user.js privacy and optimization settings
/*
* Open profile dir - find in about:support or about:profiles
* Copy this file into your profile directory.
* Add changes to this file. Save file.
* Restart Firefox. Below overrides will be loaded.
* Close Firefox and open prefs.js to confirm changes merged there.
* NOTE: only non-default values will be saved to prefs.js
*
*/
@jaywon
jaywon / README.md
Created October 19, 2017 05:54
Static Site Hosting Setup and Deployment with AWS CLI

Create Bucket

aws s3api create-bucket --bucket website-bucket-name --region us-west-2 --acl public-read --create-bucket-configuration LocationConstraint=us-west- 2

Make Bucket A Static Website

aws s3 website s3://website-bucket-name/ --index-document index.html --error-document error.html

Sync Local Project Directory to Static Website Bucket

aws s3 sync projectfolder s3://website-bucket-name --acl public-read

@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active November 14, 2024 21:20
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@rahulmutt
rahulmutt / Main.hs
Last active October 1, 2020 04:44
Fast coproducts for Haskell & Eta
#!/usr/bin/env stack
{- stack
--resolver lts-6.27
--install-ghc
runghc
--package containers
-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE DataKinds #-}