This file contains 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
package io.github.nomisrev | |
import app.cash.sqldelight.driver.jdbc.asJdbcDriver | |
import arrow.continuations.SuspendApp | |
import arrow.continuations.ktor.server | |
import arrow.fx.coroutines.autoCloseable | |
import arrow.fx.coroutines.closeable | |
import arrow.fx.coroutines.resourceScope | |
import com.zaxxer.hikari.HikariConfig | |
import com.zaxxer.hikari.HikariDataSource |
This file contains 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
open Donald | |
open System.Data.Common | |
open System.Data.SQLite | |
open System.Threading.Tasks | |
open Giraffe | |
open Giraffe.ViewEngine | |
open FsToolkit.ErrorHandling | |
open Microsoft.AspNetCore.Builder | |
[<RequireQualifiedAccess>] |
This file contains 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
[<AutoOpen>] | |
module IO = | |
type IO<'a> = | |
private | |
| Return of (unit -> 'a) | |
| Suspend of (unit -> IO<'a>) | |
let rec run x = | |
match x with | |
| Return v -> v() |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<body> | |
<h1>Recording Video from the User</h1> | |
<p>Acquire access to the camera</p> | |
<video id="player" controls></video> | |
<a id="download">Download</a> |
This file contains 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
steps: | |
- name: gcr.io/cloud-builders/docker | |
args: | |
- build | |
- '--no-cache' | |
- '-t' | |
- '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA' | |
- . | |
- '-f' | |
- Dockerfile |
This file contains 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
# Cross Platform Makefile | |
# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X | |
# | |
# You will need GLFW (http://www.glfw.org): | |
# Linux: | |
# apt-get install libglfw-dev | |
# Mac OS X: | |
# brew install glfw | |
# MSYS2: | |
# pacman -S --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-glfw |
This file contains 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
public class BindableTextBlock : TextBlock | |
{ | |
public ObservableCollection<Inline> InlineList | |
{ | |
get { return (ObservableCollection<Inline>)GetValue(InlineListProperty); } | |
set { SetValue(InlineListProperty, value); } | |
} | |
public static readonly DependencyProperty InlineListProperty = | |
DependencyProperty.Register("InlineList", typeof(ObservableCollection<Inline>), typeof(BindableTextBlock), new UIPropertyMetadata(null, OnPropertyChanged)); |
This file contains 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 python2 | |
import SimpleHTTPServer | |
import SocketServer | |
import logging | |
PORT = 8000 | |
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): |
This file contains 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
open System | |
open System.IO | |
open System.Diagnostics | |
// my first part was 3247 | |
//Found min cross at steps 48054 X 4537 and Y 4955 | |
//done in (101) ms ! | |
type Point = {X:int; Y:int; Steps: int} with | |
override this.ToString() = sprintf "(%d,%d,%d)" this.X this.Y this.Steps |
This file contains 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
open System | |
open System.IO | |
let readInts (path:string) : int [] = | |
use sw = new StreamReader (path) | |
sw.ReadToEnd().Split(",") | |
|> Array.map Int32.Parse | |
type Status = {memory:int[]; position: int; finished: bool;} | |
type Cmd = {opcode: int; op1:int ; op2: int; dest:int} |