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
set nocompatible " be iMproved | |
filetype off " required! | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" Bundles | |
" let Vundle manage Vundle | |
" required! | |
Bundle 'gmarik/vundle' |
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
#lang racket | |
(define atom? | |
(lambda (x) | |
(and (not (pair? x)) (not (null? x))))) | |
;; Is each element in list l an atom? | |
(define lat? | |
(lambda (l) | |
(cond | |
((null? l) #t) |
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
foldr + 0 [1..3]: (1 + (2 + (3 + 0))) | |
foldl + 0 [1..3]: (((0 + 1) + 2) + 3) |
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
public class PrimeWebDefaultRequestShould | |
{ | |
private readonly TestServer _server; | |
private readonly HttpClient _client; | |
public PrimeWebDefaultRequestShould() | |
{ | |
// Arrange | |
_server = new TestServer(new WebHostBuilder() | |
.UseStartup<Startup>()); | |
_client = _server.CreateClient(); |
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
// F is a doctrine entity. | |
class F { | |
private $foo, $bar; // all strings \o/ | |
} | |
// I have a native query that returns the following resultset: | |
$rs = [ | |
['foo' => 'hello', 'bar' => 'world', 'trueOrFalse' => true], | |
//.. | |
]; |
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
public class Basket : EventSource | |
{ | |
private int Id; | |
private List<Item> Items = new List<Item>(); | |
public Basket() | |
{ | |
On<ItemAddedToBasket>(e => { | |
var item = new Item(@event => |
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
af724c8c-16c3-4889-98d0-bc72b3f98542 | |
1d76283e-fa3a-4591-8cd9-8215df662446 | |
6678be79-4cdd-4381-ad95-63c61b702dde | |
f38b26b5-df17-474b-bc36-71925bc96e88 |
Last week I spent a lot of time trying to deploy an F# ASP.NET Core app (a Giraffe app, specifically) to Azure because the information to complete all the steps was scattered in several places. So I'm writing this hopefully it will save the pain to others :)
The following steps are mostly taken from this guide and it's only necessary to do them once:
- Create an account in Azure (or use an existing one)
- Create a resource group (or use an existing one)
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
foo@bar:~$ sudo apt-get install openvpn | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
openvpn is already the newest version (2.4.6-1ubuntu2). | |
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. | |
1 not fully installed or removed. | |
After this operation, 0 B of additional disk space will be used. | |
Do you want to continue? [Y/n] Y | |
Setting up gcc (4:8.2.0-1ubuntu1) ... |
OlderNewer