Skip to content

Instantly share code, notes, and snippets.

View aiya000's full-sized avatar
🐶
Inu

aiya000 aiya000

🐶
Inu
View GitHub Profile
@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 : [email protected]
Colorizer : javascript
Bib style : plainnat
Bibliography : example
Logo : True
@erikbern
erikbern / use_pfx_with_requests.py
Last active April 10, 2025 07:17
How to use a .pfx file with Python requests – also works with .p12 files
import contextlib
import OpenSSL.crypto
import os
import requests
import ssl
import tempfile
@contextlib.contextmanager
def pfx_to_pem(pfx_path, pfx_password):
''' Decrypts the .pfx file to be used with requests. '''
Usage...
Vcxsrv [:<display>] [option]
:display-number
Vcxsrv runs as the given display-number, which defaults to 0.
To run multiple instances, use unique display-numbers.
-a # default pointer acceleration (factor)
-ac disable access control restrictions
-audit int set audit trail level