ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/refs/heads/develop/ghcup-prereleases-0.0.9.yaml
ghcup install ghc 9.14.0.20251104
ghcup set ghc 9.14.0.20251104
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main where | |
| foreign import ccall unsafe "do_c_thing" do_c_thing :: Int -> IO () | |
| main = do | |
| do_c_thing 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE GHCForeignImportPrim, MagicHash, UnliftedFFITypes, UnboxedTuples #-} | |
| import GHC.Exts | |
| foreign import prim "test" tt :: Word# -> Addr# | |
| main = do | |
| case addrToAny# (tt 0##) of | |
| (# mb #) -> print (mb :: Maybe (Maybe ())) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {- cabal: | |
| build-depends: base, random, containers | |
| -} | |
| {-# LANGUAGE GADTs, ViewPatterns, GHC2021 #-} | |
| import Text.Printf | |
| import Control.Monad (liftM, ap) | |
| import Data.Function (on) | |
| import Data.List (sort, minimumBy) | |
| import System.Random | |
| import qualified Data.Map as M |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Template file for 'picom' | |
| pkgname=picom | |
| version=9 | |
| revision=1 | |
| build_style=meson | |
| configure_args="-Dwith_docs=true" | |
| hostmakedepends="pkg-config asciidoc" | |
| makedepends="MesaLib-devel dbus-devel libconfig-devel libev-devel pcre-devel | |
| pixman-devel xcb-util-image-devel xcb-util-renderutil-devel | |
| libxdg-basedir-devel uthash" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " ============================================================================= | |
| " Filename: autoload/lightline/colorscheme/wal.vim | |
| " Author: Dylan Araps | |
| " License: MIT License | |
| " Last Change: 2017/10/28 12:21:04. | |
| " ============================================================================= | |
| source $HOME/.cache/wal/colors-wal.vim | |
| let s:black = [ color0, 232 ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # ----- --- ----- | |
| echo "Installing developer command line tools..." | |
| xcode-select --install | |
| echo "Installing Homebrew..." | |
| if ! command -v brew >/dev/null 2>&1; then | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main(int argc, char *argv[]) { | |
| int arr[10]; | |
| int * arrptr; | |
| int x; | |
| int * xptr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # Log Time: | |
| # logtime.sh work 1h30m | |
| # This will add an entry to the file in $logfilename of type "work: 1h30m" under the header for the day | |
| # | |
| # Usage suggestion: | |
| # Dependencies: termdown @ https://github.com/trehn/termdown | |
| # Bash Function: | |
| # tasktimer(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| allitemsHTML = requests.get('https://minecraft-ids.grahamedgecombe.com/').text | |
| import re | |
| items = re.findall('class="name">(.*?)<.*?class="text-id">\((.*?)\)</', allitemsHTML) | |
| for i in range(len(items)): | |
| print('item id {}, item name {}, item type {}'.format(i, items[i][0], items[i][1])) |
NewerOlder