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
| // ==UserScript== | |
| // @name Qiita tagfeed AutoMore | |
| // @namespace https://htsign.hateblo.jp | |
| // @version 0.3.2 | |
| // @description auto fetch more entries | |
| // @author htsign | |
| // @include https://qiita.com/timeline* | |
| // @updateURL https://gist.github.com/htsign/0635b47b1af1a4b51719f462b1550f0e/raw/qiitaTimelineAutoMore.user.js | |
| // @downloadURL https://gist.github.com/htsign/0635b47b1af1a4b51719f462b1550f0e/raw/qiitaTimelineAutoMore.user.js | |
| // @grant none |
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
| proc fizzBuzz(n: int) = | |
| let (x, y) = (n mod 3, n mod 5) | |
| let s = | |
| if (x, y) == (0, 0): "FizzBuzz" | |
| elif x == 0: "Fizz" | |
| elif y == 0: "Buzz" | |
| else: $n | |
| echo s | |
| for x in 1..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
| import os | |
| import strformat | |
| template until(cond: bool, body: untyped): untyped = | |
| while (true): | |
| if cond: break | |
| body | |
| for param in os.commandLineParams(): | |
| if os.existsFile(param): |
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
| { | |
| "editor.DetectIndentation": true, | |
| "editor.fontFamily": "Cica", | |
| "editor.fontSize": 16, | |
| "editor.LargeFileOptimizations": true, | |
| "editor.highlightActiveIndentGuide": true, | |
| "editor.indentSize": 4, | |
| "editor.insertSpaces": true, | |
| "editor.lineNumbers": "on", | |
| "editor.matchBrackets": true, |
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
| let notNull (x : 'a when 'a : null) = not (isNull x) | |
| module Regex = | |
| open System.Text | |
| let m x = Regex(x) | |
| let isMatchWithString pattern input = Regex.IsMatch(input, pattern) | |
| let isMatchWithRegex (r : Regex) input = r.IsMatch(input) | |
| let matchWithString pattern input = | |
| match Regex.Match(input, pattern) with |
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 React from "react" | |
| import * as Oni from "oni-api" | |
| export const activate = (oni: Oni.Plugin.Api) => { | |
| console.log("config activated") | |
| // Input | |
| // | |
| // Add input bindings here: | |
| // |
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 IO = | |
| open System.IO | |
| open System.Threading.Tasks | |
| // 普通の unfold | |
| let readLines (reader : TextReader) = | |
| match reader with | |
| | null -> nullArg "reader" | |
| | r -> r |> Seq.unfold (fun r -> match r.ReadLine() with null -> None | s -> Some (s, r)) |
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
| sudo sed -i.bak -e "s/http:\/\/archive\.ubuntu\.com/http:\/\/jp\.archive\.ubuntu\.com/g" /etc/apt/sources.list && \ | |
| sudo apt update && \ | |
| sudo apt install -y \ | |
| language-pack-ja \ | |
| manpages-ja \ | |
| manpages-ja-dev \ | |
| tzdata \ | |
| && \ | |
| sudo update-locale LANG=ja_JP.UTF-8 LANGUAGE="ja_JP:ja" && \ | |
| sudo ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \ |
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
| #TagBegin= | |
| #TagEnd= | |
| #CommentBegin1=(* | |
| #CommentEnd1=*) | |
| #LineComment1=// | |
| #CommentBegin2=""" | |
| #CommentEnd2=""" | |
| #LineComment2= | |
| #SpecialSyntax=None | |
| #ScriptBegin= |
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
| string ConvertAlphabet(int index) | |
| { | |
| var chars = new List<char>(); | |
| int d = index; | |
| while (d != 0) | |
| { | |
| d = Math.DivRem(d, 26, out int r); | |
| r = r == 0 ? 26 : r; | |
| chars.Insert(0, (char)('A' + r - 1)); |