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/zsh | |
set -e | |
file=$(pwd)/.env | |
if [[ ! -e $file ]]; then | |
echo File not found: $file > /dev/stderr | |
exit 1 | |
fi |
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
// ==UserScript== | |
// @name Show total price of incoming auto delivery on Amazon.co.jp | |
// @version 1 | |
// @grant none | |
// @match https://www.amazon.co.jp/auto-deliveries* | |
// @exclude /^https:\/\/www\.amazon\.co\.jp\/auto-deliveries\/[^?]/ | |
// ==/UserScript== | |
/** | |
* Each .subscription-price-container element has price of corresponding item in JPY and (optinally) purchasing quantity. |
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
#include <array> | |
#include <bitset> | |
#include <cstddef> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <memory> | |
#include <new> | |
#include <utility> | |
#include <vector> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>IFrame Content</title> | |
</head> | |
<body> | |
<form id="ui-container"> | |
<input id="ui" /> | |
<button type="submit">Apply Changes</button> |
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
// @flow | |
export type A = 'A'; | |
export type B = 'B'; | |
export type T = A | B; | |
export function isA(data: T): %checks { | |
return data === '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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use feature qw/say state/; | |
use Algorithm::LibLinear; | |
use Lingua::ZH::Jieba; # Word segmentor for Chinese language. | |
use Text::Ngrams; # Language-independent n-gram generator. |
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 perl | |
use strict; | |
use warnings; | |
use feature qw/say/; | |
use PadWalker qw/var_name/; | |
my $foo = 42; | |
my $bar = 'blah blah blah'; | |
my $baz = undef; |
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
let () = | |
let n = int_of_string Sys.argv.(1) in | |
let open Lwt.Infix in | |
let ping = Lwt_mvar.create_empty () in | |
let rec consumer () = | |
Lwt_mvar.take ping >>= function | |
| false -> Lwt.return_unit | |
| true -> print_endline "ping"; consumer () in | |
let producer () = | |
let rec loop i = Lwt_mvar.put ping (i < n) >>= fun () -> loop (i + 1) in |
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
#include <algorithm> | |
#include <arpa/inet.h> | |
#include <cstdint> | |
#include <cstdio> | |
#include <fstream> | |
#include <istream> | |
#include <numeric> | |
#include <set> | |
#include <stdexcept> | |
#include <string> |
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
#include <algorithm> | |
#include <cstdint> | |
#include <cstdio> | |
#include <limits> | |
using namespace std; | |
template <size_t Bits> | |
struct IntegerTrait {}; |
NewerOlder