A collection of bookmarks covering the topics of
- functional programming with haskell
- type theory
- category theory
- formal verification
- interesting stuff for haskellers
| #include <windows.h> | |
| #include <wininet.h> | |
| #include <stdio.h> | |
| #pragma comment(lib, "wininet.lib") | |
| // notepad.exe shellcode | |
| char shellcode[] = { | |
| 0xfc, 0x48, 0x83, 0xe4, 0xf0, 0xe8, 0xc0, 0x00, 0x00, 0x00, 0x41, 0x51, 0x41, 0x50, 0x52, 0x51, | |
| 0x56, 0x48, 0x31, 0xd2, 0x65, 0x48, 0x8b, 0x52, 0x60, 0x48, 0x8b, 0x52, 0x18, 0x48, 0x8b, 0x52, |
| """ | |
| Enum union based on and compatible with the standard library's `enum`. | |
| """ | |
| # MIT License | |
| # | |
| # Copyright (c) 2020 Paolo Lammens | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal |
| Rank | Type | Prefix/Suffix | Length | |
|---|---|---|---|---|
| 1 | Prefix | my+ | 2 | |
| 2 | Suffix | +online | 6 | |
| 3 | Prefix | the+ | 3 | |
| 4 | Suffix | +web | 3 | |
| 5 | Suffix | +media | 5 | |
| 6 | Prefix | web+ | 3 | |
| 7 | Suffix | +world | 5 | |
| 8 | Suffix | +net | 3 | |
| 9 | Prefix | go+ | 2 |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter/gestures.dart'; | |
| import 'package:flutter/widgets.dart'; | |
| import 'package:flutter/rendering.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| // This widget is the root of your application. | |
| @override | |
| Widget build(BuildContext context) { |
| import 'package:flutter/gestures.dart'; | |
| import 'package:flutter/rendering.dart'; | |
| import 'package:flutter/widgets.dart' hide PageView; | |
| /// This is copy-pasted from the Flutter framework with a support added for building | |
| /// pages off screen using [Viewport.cacheExtents] and a [LayoutBuilder] | |
| /// | |
| /// Based on commit 3932ffb1cd5dfa0c3891c60977ee4f9cd70ade66 on channel dev | |
| // Having this global (mutable) page controller is a bit of a hack. We need it |
| # Synchronize history between bash sessions | |
| # | |
| # Make history from other terminals available to the current one. However, | |
| # don't mix all histories together - make sure that *all* commands from the | |
| # current session are on top of its history, so that pressing up arrow will | |
| # give you most recent command from this session, not from any session. | |
| # | |
| # Since history is saved on each prompt, this additionally protects it from | |
| # terminal crashes. |
| ///$(which true);FLAGS="-g -Wall -Wextra --std=c17 -O1 -fsanitize=address,undefined";THIS_FILE="$(cd "$(dirname "$0")"; pwd -P)/$(basename "$0")";OUT_FILE="/tmp/build-cache/$THIS_FILE";mkdir -p "$(dirname "$OUT_FILE")";test "$THIS_FILE" -ot "$OUT_FILE" || $(which clang || which gcc) $FLAGS "$THIS_FILE" -o "$OUT_FILE" || exit $?;exec bash -c "exec -a \"$0\" \"$OUT_FILE\" $([ $# -eq 0 ] || printf ' "%s"' "$@")" | |
| #include <stdio.h> | |
| int main() { | |
| printf("Hello world!\n"); | |
| return 0; | |
| } |
| #!/bin/bash | |
| YOUR_WINDOWS_USERDIRECTORY_NAME_HERE="" | |
| WIN_TEMP_PATH="/mnt/c/Users/$YOUR_WINDOWS_USERDIRECTORY_NAME_HERE/AppData/Local/Temp" | |
| CURRENT_DIR=`pwd` | |
| if [ $# -eq 0 ] | |
| then | |
| echo "No arguments supplied" | |
| exit 1 |
| #!/usr/bin/env python2.7 | |
| """Find the Access Codes | |
| In order to destroy Commander Lambda's LAMBCHOP doomsday device, you'll need | |
| access to it. But the only door leading to the LAMBCHOP chamber is secured with | |
| a unique lock system whose number of passcodes changes daily. Commander Lambda | |
| gets a report every day that includes the locks' access codes, but only she | |
| knows how to figure out which of several lists contains the access codes. You | |
| need to find a way to determine which list contains the access codes once |