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
$('.approve').click(); | |
window.setTimeout(function(){window.location.replace($('.prev_page')[0].href)}, 1000) |
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 Css.File | |
import MyCss | |
import Html exposing (div, text, node) | |
import Html.Attributes exposing (id, class) | |
css = | |
Css.File.compile [ MyCss.css ] |
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
/p/butsku-cli ./target/debug/butsku-cli status save (582ms) | |
Status saved | |
/p/butsku-cli ./target/debug/butsku-cli status list (258ms) | |
+------------+-------------------+----------------------------------+-----------------------------------------------------+ | |
| Machine ID | Mac address | Timestamp | Meta | | |
+------------+-------------------+----------------------------------+-----------------------------------------------------+ | |
| abel.local | A1:B2:12:1A:B2:C3 | 2019-05-09T15:52:30.379415+00:00 | Uptime: 18d 01h 11min, Load average: 2.13 1.93 1.84 | | |
+------------+-------------------+----------------------------------+-----------------------------------------------------+ |
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
interface User { | |
username: string; | |
email: string; | |
} | |
export function main() { | |
let isLoading = true; | |
let fetchFailed = false; | |
let data: User; |
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
import { RemoteData, Success, Failure, Loading } from "./RemoteData"; | |
interface User { | |
username: string; | |
email: string; | |
} | |
export function main() { | |
let userRequest: RemoteData<User, Error> = Loading; |
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
export const NotAsked: NotAsked = { type: "NotAsked" }; | |
export const Loading: Loading = { type: "Loading" }; | |
export const Success = <T>(data: T): Success<T> => ({ | |
type: "Success", | |
data | |
}); | |
export const Failure = <E>(error: E): Failure<E> => ({ | |
type: "Failure", | |
error | |
}); |
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
interface NotAsked { | |
type: "NotAsked"; | |
} | |
interface Loading { | |
type: "Loading"; | |
} | |
interface Success<T> { | |
type: "Success"; |
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
type Data = | |
| { | |
type: "Loading"; | |
} | |
| { | |
type: "Success"; | |
data: User; | |
} | |
| { | |
type: "Failure"; |
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
interface User { | |
username: string; | |
email: string; | |
} | |
type Translations = { [key: string]: string }; | |
export function main() { | |
let userRequest: RemoteData<User, Error> = Loading; | |
let translationsRequest: RemoteData<Translations, Error> = Loading; |
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
export function main() { | |
let userRequest: Data = { type: "Loading" }; | |
fetchData() | |
.then(response => { | |
userRequest = { type: "Success", data: response }; | |
}) | |
.catch(error => { | |
userRequest = { type: "Failure", error }; | |
}); |
OlderNewer