Skip to content

Instantly share code, notes, and snippets.

View mugifly's full-sized avatar
🏠
Working from home

Masanori Ohgita mugifly

🏠
Working from home
View GitHub Profile
@jugyo
jugyo / sublime_text_2_plugin_tips.md
Created August 13, 2012 09:54
Sublime Text 2 Plugin Tips

Sublime Text 2 Plugin Tips

API Reference

コマンドの実行はコンソール( ctrl + ` で開ける)で以下を実行する:

view.run_command('example')
@gsainio
gsainio / gist:6322375
Created August 23, 2013 18:20
Sample perl code to use service accounts and oauth2 with Google's Admin SDK API.
#!/usr/public/bin/perl -w
use strict;
use JSON;
use JSON::WebToken;
use LWP::UserAgent;
use HTML::Entities;
my $private_key_string = q[-----BEGIN PRIVATE KEY-----
@esehara
esehara / gist:3160352
Created July 22, 2012 17:21
良い Commit Messageを書きましょう(翻訳)

by https://github.com/erlang/otp/wiki/Writing-good-commit-messages

良いコミットメッセージは、重要な役割が、少なくとも三つあります。

  • レビューするプロセスをスピードアップする。
  • 良いリリースノートを書く手助けになる。
  • 将来、Erlang/OTPのメンテナンスを手助けするため(もしかしたら君かも!)。それは五年後の未来において、なんでコードの中で特定の変更が加えられたのか、あるいは特定の機能が追加されたのか見つけるため、ということ。
@ShawnHymel
ShawnHymel / LiquidLevelSensor.ino
Last active August 24, 2021 07:43
Sample Arduino code for the SST Liquid Level Sensor
// Liquid level detection using an SST sensor
//
// When a liquid touches the tip of the sensor,
// an LED at pin 13 turns on.
//
// Hardware:
// Sensor | Arduino
// -------------|---------
// Vs (RED) | 5V
// Out (GREEN) | pin 7
@aerialist
aerialist / switchbot_bluepy.py
Created May 1, 2017 11:03
Activate switchbot by python with bluepy on Raspberry Pi
# Activate switchbot by python with bluepy on Raspberry Pi
# https://github.com/IanHarvey/bluepy
#
# Switchbot's API is taken from this
# https://github.com/OpenWonderLabs/python-host
import binascii
from bluepy.btle import Peripheral
# find your switchbot address by
@focusaurus
focusaurus / ep_app.js
Last active June 14, 2022 00:06
Example of how a main express app can mount sub-applications on a mount point with app.use('/mount-point', subapp); If you GET /, you'll see the main_app's '/' response. If you GET /ep_app, you'll see the ep_app's '/' response.
const express = require("express");
const router = express.Router();
router.get('/', function (req, res) {
res.send("This is the '/' route in ep_app");
});
module.exports = router;
@teppeis
teppeis / tenkaichi-git.md
Last active April 29, 2023 14:58
天下一gitconfig大会

天下一gitconfig大会(サイボウズ社内git勉強会@2012/11/20)の@teppeisの資料です。

ぎっとぎとにしてやんよ

DojoCat

  • gistでmarkdown書いたらbookmarkletでプレゼンになるよ。
@learncodeacademy
learncodeacademy / iris-tensorflow-js.js
Last active July 20, 2023 04:20
Solving Iris with Tensorflow.js and Iris JSON dataset
import * as tf from "@tensorflow/tfjs"
import "@tensorflow/tfjs-node"
import iris from "./iris.json"
import irisTesting from "./iris-testing.json"
// convert/setup our data
const trainingData = tf.tensor2d(iris.map(item => [
item.sepal_length, item.sepal_width, item.petal_length, item.petal_width,
]))
const outputData = tf.tensor2d(iris.map(item => [
@walfie
walfie / clubdam-api.md
Last active April 14, 2024 03:43
ClubDAM API docs