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
#!/bin/bash | |
# Warning: converts file in place | |
# Usage: | |
# convert-heic kittens009142.heic | |
set -eu | |
if [ $# != 1 ]; then |
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 python3 | |
# ghost-add-user, (c) Martin Keegan 2021 | |
# Copyright licence: Apache Software Licence 2.0 | |
# A tool for adding new users to Ghost CMS from the command line | |
# please excuse this pre-alpha code. I was in a massive hurry. | |
import logging |
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
with Text_IO,Ada.Numerics.Generic_Elementary_Functions; | |
with Ada.Numerics; | |
use Text_IO,Ada.Numerics; | |
procedure Eutecticmain is | |
package Real_Io is new FLOAT_IO(Float); | |
use Real_Io; | |
package Integer_IO is new Text_IO.INTEGER_IO(Integer); use Integer_IO; | |
use Integer_Io; | |
package Elem_Fct is new Ada.Numerics.Generic_Elementary_Functions (Float); |
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
with Ada.Text_IO; use Ada.Text_IO; | |
with Ada.Command_Line; | |
with Ada.Containers.Vectors; use Ada.Containers; | |
package body Dynamic_Allocation_Experiment | |
is | |
type Side is (Left, Right); | |
package Side_Container is new Vectors (Natural, Side); | |
use Side_Container; |
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
with Ada.Text_IO; use Ada.Text_IO; | |
with Ada.Command_Line; | |
with Ada.Unchecked_Deallocation; | |
package body Dynamic_Allocation_Experiment | |
is | |
type Side is (Left, Right); | |
type Side_Array is array (Integer range <>) of Side; | |
type Side_Array_Ptr is access Side_Array; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
int main(int argc, char *argv[], char *env[]) { | |
char *arena; | |
char hex[100]; | |
char *target; |
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
mk270@cornford ~/Src/word_generator> cargo build | |
Updating git repository `https://github.com/rust-lang/rand.git` | |
Downloading unicode-segmentation v0.1.0 | |
Downloading regex v0.1.30 | |
Compiling rustc-serialize v0.3.14 | |
Compiling regex v0.1.30 | |
Compiling libc v0.1.6 | |
Compiling unicode-segmentation v0.1.0 | |
Compiling rand v0.3.8 (https://github.com/rust-lang/rand.git#93544850) | |
Compiling word_generator v0.1.0 (file:///home/mk270/Src/word_generator) |
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
%% Feel free to use, reuse and abuse the code in this file. | |
%% @private | |
-module(websocket_app). | |
-behaviour(application). | |
%% API. | |
-export([start/2]). | |
-export([stop/1]). |
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
-module(ws_handler). | |
-behaviour(cowboy_websocket_handler). | |
-export([init/3]). | |
-export([websocket_init/3]). | |
-export([websocket_handle/3]). | |
-export([websocket_info/3]). | |
-export([websocket_terminate/3]). | |
init({tcp, http}, _Req, _Opts) -> |
NewerOlder