This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
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
{-# LANGUAGE FlexibleInstances, OverloadedStrings #-} | |
import Data.Function ((&)) | |
import Data.String (IsString) | |
data X | |
data Y | |
data Z | |
data M 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
#!/bin/bash | |
# !!WARNING!! | |
# This will DELETE all efforts you have put into configuring nix | |
# Have a look through everything that gets deleted / copied over | |
nix-env -e '.*' | |
rm -rf $HOME/.nix-* | |
rm -rf $HOME/.config/nixpkgs |
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
import * as http from "http"; | |
import { ReaderTaskEither } from "fp-ts/lib/ReaderTaskEither" | |
import { TaskEither, fromIO } from "fp-ts/lib/TaskEither"; | |
import { IO } from "fp-ts/lib/IO"; | |
import { Task } from "fp-ts/lib/Task"; | |
import axios, { AxiosInstance } from 'axios'; | |
import { Either, left, right } from "fp-ts/lib/Either"; | |
export type Logger = (s: string) => TaskEither<never, void>; |
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 cabal | |
{- cabal: | |
build-depends: | |
, base ^>= 4.12.0.0 | |
, comonad ^>= 5.0 | |
, pretty-simple ^>= 2.2 | |
, text | |
-} | |
{-# LANGUAGE OverloadedStrings #-} |
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
import { head as headArr, reverse, snoc as snocArr, tail as tailArr } from "fp-ts/lib/Array"; | |
import { | |
applyFlipped, | |
compose, | |
constant, | |
Curried2, | |
Curried3, | |
curry, | |
Endomorphism, | |
flip, |
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
/* Customize website's scrollbar like Mac OS | |
Not supports in Firefox and IE */ | |
/* total width */ | |
body::-webkit-scrollbar { | |
background-color: #fff; | |
width: 16px; | |
} | |
/* background of the scrollbar except button or resizer */ |
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
// https://raw.githubusercontent.com/donnut/typescript-ramda/master/ramda.d.ts | |
// https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/lodash/lodash.d.ts | |
declare namespace fp { | |
interface Dictionary<T> { | |
[index: string]: T; | |
} | |
interface CurriedFunction1<T1, R> { |
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
-- To run: | |
-- cabal repl -b pretty-simple | |
-- | |
-- Colorizing and pretty-printing ghci output | |
-- requires: pretty-simple | |
:set -interactive-print=Text.Pretty.Simple.pPrint | |
-- green bold lambdas and multiline mode | |
:set prompt "\ESC[1;32mλ: \ESC[m" | |
:set prompt-cont "\ESC[1;32mλ| \ESC[m" |
- Virus Name: WannaCrypt, WannaCry, WanaCrypt0r, WCrypt, WCRY
- Vector: All Windows versions before Windows 10 are vulnerable if not patched for MS-17-010. It uses EternalBlue MS17-010 to propagate.
- Ransom: between $300 to $600. There is code to 'rm' (delete) files in the virus. Seems to reset if the virus crashes.
- Backdooring: The worm loops through every RDP session on a system to run the ransomware as that user. It also installs the DOUBLEPULSAR backdoor. It corrupts shadow volumes to make recovery harder. (source: malwarebytes)
- Kill switch: If the website
www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com
is up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm. Will not work if proxied (source).
update: A minor variant of the viru