Skip to content

Instantly share code, notes, and snippets.

View ulrikstrid's full-sized avatar

Ulrik Strid ulrikstrid

View GitHub Profile
#!/bin/bash
echo "Setting username and email"
git config --global user.email "$USER_EMAIL"
git config --global user.name "$USER_NAME"
echo "Checking out the $1 branch"
git checkout -b "$1"
echo "Merging with master"
git merge master
echo "Add the build catalog"
@ulrikstrid
ulrikstrid / settings.json
Created December 13, 2017 06:28
vscode user settings
{
// look and feel
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "Panda Syntax",
"editor.fontFamily": "'Fira Code', 'Hasklig', 'Droid Sans Mono",
"editor.fontLigatures": true,
// quality of leif
"workbench.editor.enablePreview": false,
// editing
"editor.formatOnSave": true,
import "rxjs/add/observable/fromEvent";
import "rxjs/add/observable/merge";
import * as classnames from "classnames";
import { css } from "emotion";
import { add } from "ramda";
import * as React from "react";
import { Observable } from "rxjs/Observable";
import { filter, flatMap, map, scan, takeUntil } from "rxjs/operators";
import { Subscription } from "rxjs/Subscription";
@ulrikstrid
ulrikstrid / VSTS.yml
Last active September 11, 2018 09:26
Azure Pipelines esy
resources:
- repo: self
phases:
- phase: Phase_1
displayName: Linux
condition: succeeded()
queue:
name: Hosted Linux Preview
demands: node.js
@ulrikstrid
ulrikstrid / azure-pipeline.yml
Last active September 18, 2018 18:19
Lumo VSTS setup
resources:
- repo: self
fetchDepth: 5
queue:
name: Hosted VS2017
demands:
- yarn
- Cmd
-----BEGIN CERTIFICATE-----
MIIFvjCCA6agAwIBAgIITyTh/u1bExowDQYJKoZIhvcNAQENBQAwYjEkMCIGA1UE
CgwbRmluYW5zaWVsbCBJRC1UZWtuaWsgQklEIEFCMRowGAYDVQQLDBFJbmZyYXN0
cnVjdHVyZSBDQTEeMBwGA1UEAwwVQmFua0lEIFNTTCBSb290IENBIHYxMB4XDTEx
MTIwNzEyMzQwN1oXDTM0MTIzMTEyMzQwN1owYjEkMCIGA1UECgwbRmluYW5zaWVs
bCBJRC1UZWtuaWsgQklEIEFCMRowGAYDVQQLDBFJbmZyYXN0cnVjdHVyZSBDQTEe
MBwGA1UEAwwVQmFua0lEIFNTTCBSb290IENBIHYxMIICIjANBgkqhkiG9w0BAQEF
AAOCAg8AMIICCgKCAgEAwVA4snZiSFI3r64LvYu4mOsI42A9aLKEQGq4IZo257iq
vPH82SMvgBJgE52kCx7gQMmZ7iSm39CEA19hlILh8JEJNTyJNxMxVDN6cfJP1jMH
JeTES1TmVbWUqGyLpyT8LCJhC9Vq4W3t/O1svGJNOUQIQL4eAHSvWTVoalxzomJh
steps:
- script: |
Test-Path HKLM:System\CurrentControlSet\Control\FileSystem
Write-Host Getting long path registry value...
Get-ItemProperty -Path HKLM:System\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled
Write-Host Setting long path registry value...
Set-ItemProperty -Path HKLM:System\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled -Value 1
Write-Host New Value
Get-ItemProperty -Path HKLM:System\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled
Write-Host DONE $LastExitCode
info Skipping @opam/zed@opam:1.6
info Skipping @opam/zarith@opam:1.7
info Skipping @opam/yojson@opam:1.7.0
info Skipping @opam/x509@opam:0.6.3
info Skipping @opam/utop@opam:2.3.0
info Skipping @opam/uri@opam:2.2.1
info Skipping @opam/topkg@opam:1.0.0
info Skipping @opam/tls@opam:0.10.2
info Skipping @opam/stringext@opam:1.6.0
info Skipping @opam/stdlib-shims@opam:0.1.0
/Users/ulrik.strid/Projects/private/reason-sample-project/_esy/default/store/i/bs_platform-1a130133/lib/bsc.exe -pp "/Users/ulrik.strid/Projects/private/reason-sample-project/_esy/default/store/i/bs_platform-1a130133/lib/refmt.exe --print binary" -bs-jsx 2 -w -30-40+6+7+27+32..39+44+45+101 -bs-suffix -nostdlib -I '/Users/ulrik.strid/Projects/private/reason-sample-project/_esy/default/store/i/bs_platform-1a130133/lib/ocaml' -color always -c -o src/Index.mlast -bs-syntax-only -bs-binary-ast -impl /Users/ulrik.strid/Projects/private/reason-sample-project/_esy/default/store/b/reason_sample_project-813e484a/src/Index.re
/Users/ulrik.strid/Projects/private/reason-sample-project/_esy/default/store/i/bs_platform-1a130133/lib/bsb_helper.exe -bs-ns ReactLite -g 0 src/Index.mlast
/Users/ulrik.strid/Projects/private/reason-sample-project/_esy/default/store/i/bs_platform-1a130133/lib/bsc.exe -bs-package-name react-lite -bs-ns ReactLite -bs-package-output commonjs:lib/js/src -bs-re-out -bs-super-errors -I /Users/ulrik.
@ulrikstrid
ulrikstrid / Fetch.ml
Created August 8, 2019 13:54
Fetch implementation in reason
let fetch = (~meth=`GET, ~body=?, ~headers=[], url) => {
let uri = Uri.of_string(url);
let url_host = Uri.host_with_default(~default="", uri);
let url_scheme =
Uri.scheme(uri)
|> (
fun
| Some(scheme) => scheme
| None => "https"