Skip to content

Instantly share code, notes, and snippets.

View aiya000's full-sized avatar
🐶
Inu

aiya000 aiya000

🐶
Inu
View GitHub Profile
@mohemohe
mohemohe / kokoro.io.js
Last active October 23, 2017 13:03
こぴぺした
function checkUnread() {
const unreadsArray = document.querySelectorAll('.channel_name .badge.pull-right');
let counter = 0;
unreadsArray.forEach((value, index, array) => {
const innterString = value.innerHTML;
const parseData = parseInt(innterString, 10);
if(!isNaN(parseData)) {
counter += parseData;
}
@mohemohe
mohemohe / LICENSE
Last active October 29, 2017 16:19
心.io | require: curl, jq
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2017 mohemohe <mohemohe@ghippos.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@jagrament
jagrament / sebastien_cgs_weather_sample.js
Last active May 22, 2018 11:13
CGS Lambda sample for Expert Agent Developer Dashboard (https://developers.sebastien.ai)
'use strict';
console.log('Loading function');
exports.handler = (event, context, callback) => {
const done = (err, res) => callback(null, {
statusCode: err ? '400' : '200',
body: err ? err.message : JSON.stringify(res),
headers: {
'Content-Type': 'application/json',

Problem

In Arch Linux mkinitcpio -p linux

shows

Possibly missing firmware for module: aic94xx
 Possibly missing firmware for module: wd719x
@okapies
okapies / mastodon-client.md
Last active October 3, 2023 10:18
Mastodon API の叩き方

Mastodon の API を叩くには以下の手順を踏む必要がある:

  1. OAuth2 クライアントを登録する
  2. アクセストークンを取得する
  3. アクセストークンを Authorization ヘッダに指定して API にアクセスする

OAuth2 クライアント登録

Mastodon の Apps API に登録情報を送ってクライアントを払い出してもらう(一度だけやれば OK).

@as-capabl
as-capabl / lens-prism.hs
Created February 21, 2017 08:59
LensとPrismで解きたい問題
-- 与えるもの:あるレコード型とその上のLens
data Hoge = Hoge { _hoge1 :: ..., _hoge2 :: ..., ... }
makeLenses ''Hoge -- hoge1, hoge2, ...が定義される
-- ↓ ここからTemplate Haskellで生成するか、あるいは...
-- 欲しいもの1:直和型とその上のPrism
data CoHoge = CoHoge1 ... | CoHoge2 ...
makePrisms ''CoHoge -- _CoHoge1, _CoHoge2, ...が定義される
-- CoHogeのコンストラクタはなくてもいい。型とPrismが必要
@myuon
myuon / rev.hs
Created December 1, 2016 12:53
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE DataKinds, GADTs, TypeFamilies, PolyKinds, TypeOperators #-}
{-# LANGUAGE RankNTypes, TypeApplications #-}
import Prelude(($), putStrLn)
-- equality
infix 2 ==
data (==) :: k -> k -> * where
Refl :: a == a
@chrisdone
chrisdone / Printf.idr
Last active May 27, 2024 13:01
Type-safe dependently-typed printf in Idris
module Printf
%default total
-- Formatting AST.
data Format
= FInt Format
| FString Format
| FOther Char Format
| FEnd
@z80oolong
z80oolong / 00_TMUX_FIX.md
Last active October 4, 2021 22:50
tmux 2.5 以降において East Asian Ambiguous Character を全角文字の幅で表示する

tmux 2.5 以降において East Asian Ambiguous Character を全角文字の幅で表示する

告知 (2019/03/15, 2020/04/29)

これまで、本稿の Gist にて公開しておりました [tmux 2.5][TMUX] 以降において [East Asian Ambiguous Character][EAWA] を全角文字の幅で表示する為の差分ファイルについて、差分ファイルの分量が多くなったことに伴い、今後は以下の [Github][GITH] のリポジトリにて [tmux][TMUX] の [East Asian Ambiguous Character][EAWA] 対応差分ファイルを公開することと致します。

また、今後 [East Asian Ambiguous Character][EAWA] 対応の [tmux][TMUX] の導入を御考えの方は、後述する [Linuxbrew][BREW] を用いた差分ファイルの適用及びインストール若しくは、 [AppImage パッケージ][APPR]を用いたインストールを御勧め致します。

@IlIlIlIl
IlIlIlIl / madoko-header-full.mdk
Last active July 26, 2018 11:29
madoko-header-full.mdk
Title : Fooooo
Author : You
Affiliation : Research institute
Email : you@bar.com
Colorizer : javascript
Bib style : plainnat
Bibliography : example
Logo : True