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
// Returns a function, that, as long as it continues to be invoked, will not | |
// be triggered. The function will be called after it stops being called for | |
// N milliseconds. If `immediate` is passed, trigger the function on the | |
// leading edge, instead of the trailing. | |
function debounce(func, wait, immediate) { | |
var timeout; | |
return function() { | |
var context = this, args = arguments; | |
var later = function() { | |
timeout = null; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1"> | |
<link rel="icon" href="favicon.ico?v=1" type="image/icon"> | |
</head> | |
<body> | |
</body> | |
</html> |
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
module MyWebApi.Program | |
open Suave | |
open Suave.Successful | |
open System.Net | |
[<EntryPoint>] | |
let main argv = | |
let config = |
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
server { | |
listen 80; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443; | |
server_name cantare.local; |
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
// Learn more about F# at http://fsharp.org | |
// See the 'F# Tutorial' project for more help. | |
open FSharp.Data | |
open System.IO | |
open Suave | |
open Suave.Filters | |
open Suave.Operators | |
open Suave.Successful | |
open System.Net |
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
module Main exposing (..) | |
import Html exposing (Html, text, div, button) | |
import Html.Events exposing (onClick) | |
import Json.Encode | |
import Json.Decode | |
import Http exposing (..) | |
-- elm-package install -- yes |
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
module Main exposing (..) | |
import Http | |
import Html exposing (Html, div, text, program, button) | |
import Html.Events exposing (onClick) | |
type alias Model = | |
String |
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
const express = require("express"); | |
const app = express(); | |
const fs = require("fs"); | |
function base64_encode(file) { | |
// read binary data | |
return new Promise((resolve, reject) => { | |
fs.readFile(file, (err, data) => { | |
if(err){ | |
reject(err); |
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
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using SampleClassLib; | |
using System; | |
using System.Windows.Forms; | |
namespace TestNamespace | |
{ | |
[TestClass()] | |
public sealed class DivideClassTest | |
{ |
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
module redgiraffe | |
open System | |
open System.IO | |
open System.Text | |
open System.Security.Claims | |
open System.Collections.Generic | |
open Microsoft.AspNetCore.Builder | |
open Microsoft.AspNetCore.Hosting | |
open Microsoft.AspNetCore.Http |