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
| from pathlib import Path | |
| from typing import Optional | |
| import re | |
| import html | |
| import urllib.request | |
| import markdownify | |
| class Converter(markdownify.MarkdownConverter): |
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 * as path from "https://deno.land/[email protected]/path/mod.ts"; | |
| const content = await Deno.readTextFile(Deno.args[0]); | |
| const outDir = Deno.args[1] || "output"; | |
| await Deno.mkdir(outDir, { recursive: true }); | |
| console.log(`Export to ${outDir}`); | |
| const articles = content.split("AUTHOR: agtn").slice(1); | |
| function parseArticle( |
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 * as path from "https://deno.land/[email protected]/path/mod.ts"; | |
| import ky from "https://cdn.skypack.dev/ky?dts"; | |
| const outDir = Deno.args[0] || "output"; | |
| await Deno.mkdir(outDir, { recursive: true }); | |
| console.log(`Export to ${outDir}`); | |
| const items = await (ky.get( | |
| "https://qiita.com/api/v2/authenticated_user/items?page=1&per_page=100", | |
| { |
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
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| "github.com/agatan/timejump" | |
| ) | |
| func F() { |
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
| extern crate signal_notify; | |
| use signal_notify::{notify, Signal}; | |
| use std::thread; | |
| fn main() { | |
| let rx = notify(&[Signal::INT]); | |
| thread::spawn(|| { | |
| loop { | |
| thread::sleep(::std::time::Duration::from_secs(10)); |
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
| #include <boost/config/warning_disable.hpp> | |
| #include <boost/spirit/include/qi.hpp> | |
| #include <boost/spirit/include/phoenix.hpp> | |
| #include <boost/fusion/include/adapt_struct.hpp> | |
| #include <boost/variant/recursive_variant.hpp> | |
| #include <boost/spirit/home/support/iterators/line_pos_iterator.hpp> | |
| #include <iostream> | |
| #include <fstream> | |
| #include <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
| #include <fstream> | |
| #include <iterator> | |
| #include <iostream> | |
| #include <string> | |
| #include <vector> | |
| #include <boost/spirit/include/qi.hpp> | |
| #include <boost/spirit/include/phoenix.hpp> | |
| namespace qi = boost::spirit::qi; |
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
| for lib in $(llvm-config --libs) | |
| do | |
| echo $lib | sed -e "s/-l\(.*\)/#[link(name = \"\1\")]/" | |
| done |