Skip to content

Instantly share code, notes, and snippets.

View 9bic's full-sized avatar
🤓
👐

Takashi Saito 9bic

🤓
👐
  • Japan
View GitHub Profile
@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).

@nitaku
nitaku / README.md
Last active March 10, 2023 21:03
Isometric "treemap"

A treemap algorithm is used to area-encode an array of random values, while an isometric projection is used to length-encode a second random value. Occlusion is extremely limited by the ordering of the treemap algorithm, making the diagram fairly readable (compare with a bar chart example that does not exhibit this property). This is possible because parallelepipedons are drawn by following the same ordering used by the treemap (to be honest, we tried and succedeed in using this method, but we are not aware of the internals of the treemap ordering algorithm that makes this possible).

An interaction tecnique is also put into place to let users focus on specific parallelepipedons by making the other ones translucent. This can be used to better evaluate their height. Because there are no fully occluded parallelepipedons, there is always a way to select a specific one.

Implementation note: we formerly used z as the name for the z axis, but this conflicted with

@posaunehm
posaunehm / Sample.cs
Last active August 29, 2015 14:07
An sample method for Typetalk api with C# (https://developer.nulab-inc.com/docs/typetalk)
// Refer follwing modules:
// using System.Collections.Generic;
// using System.Net.Http;
// using System.Web.Script.Serialization;
private async void Application_Startup(object sender, StartupEventArgs e)
{
var clientId = "xxxxxxxxxxxx";
var clientSecret = "xxxxxxxxxxxxxxx";
var topicId = 0; //use your topic id
@crallen
crallen / SnakeCaseContractResolver.cs
Created February 26, 2014 20:46
Json.NET contract resolver that uses Ruby-style lowercase with underscore naming conventions.
using Newtonsoft.Json.Serialization;
namespace ConsoleApplication3
{
public class SnakeCaseContractResolver : DefaultContractResolver
{
protected override string ResolvePropertyName(string propertyName)
{
return GetSnakeCase(propertyName);
}
@hiroeorz
hiroeorz / Firmataプロトコル.md
Last active October 15, 2023 05:04
firmataプロトコル覚え書き

Firmataプロトコル概要 (Ver 2.3)

FirmataはPC - マイコン間でやり取りするためのプロトコルです。汎用入出力の値の取得・書き込みその他の操作をPC側からArduinoのようなマイコンに対して行う為に使用されます。

firmata.org

Arduinoでの使用

ArduinoでFirmataプロトコルを使用してホストコンピュータとやり取りする場合は、ArduinoIDEを立ち上げて、ファイル -> スケッチの例 -> Firmata -> Standard Firmata を選択、開きそのままArduinoに書き込めば良いです。

##プロトコルフォーマット

@hyuki0000
hyuki0000 / private.xml
Created July 10, 2013 15:08
private.xml for KeyRemap4MacBook to remap ESC -> ESC + EISUU and ^[ to ^[ EISUU. This is to make Kotoeri disable in vim's normal mode. Based on http://r7kamura.hatenablog.com/entry/20110217/1297910068
<?xml version="1.0"?>
<root>
<list>
<item>
<name>LeaveInsMode with EISUU(Terminal)</name>
<identifier>private.app_terminal_esc_with_eisuu</identifier>
<only>TERMINAL</only>
<autogen>--KeyToKey-- KeyCode::ESCAPE, KeyCode::ESCAPE, KeyCode::JIS_EISUU</autogen>
<autogen>--KeyToKey-- KeyCode::JIS_BRACKET_LEFT, VK_CONTROL, KeyCode::JIS_BRACKET_LEFT, VK_CONTROL, KeyCode::JIS_EISUU</autogen>
</item>
@n13i
n13i / gist:5421671
Last active July 23, 2016 15:15
#moyasearch
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use FindBin qw($Bin);
use Encode;
use YAML;
use Net::Twitter::Lite::WithAPIv1_1;
use DateTime;
@torufurukawa
torufurukawa / gist:2723412
Created May 18, 2012 05:45
jQuery で Basic 認証のかかったリソースにアクセスする
<html>
<head>
<title>client</title>
<script type="text/javascript" src="jquery-1.7.2.js"></script>
<script type="text/javascript" src="jquery.base64.js"></script>
<script type="text/javascript">
function getinfo() {
$.ajax({
url: "http://example.com/",
success: function(data){alert('OK');},