Skip to content

Instantly share code, notes, and snippets.

View daiiz's full-sized avatar
🍹
Working from home

Daiki Iizuka daiiz

🍹
Working from home
View GitHub Profile
@daiiz
daiiz / google_ai_studio_🔥👨‍🚒.js
Last active March 28, 2024 02:25
Google AI Studioでの日本語入力体験を改善するブックマークレット
/**
* Enterキーで送信されないようにする。
* 代わりにCmd(Ctrl)+Enterキーで送信する。
*
* Author : daiiz
* License : MIT
* 最終動作確認: 2024/3/28 11:00 JST
*/
javascript:(function () {
@daiiz
daiiz / palette_server.py
Last active April 24, 2016 18:15
A local server for tfPhotoPalette
# coding: utf-8
from flask import Flask, request, jsonify
import urllib
app = Flask(__name__)
def getPhoto (received_json):
return {
"base64jpg": received_json['jpg'],
"jpg" : urllib.urlopen(received_json['jpg']).read(),
var ltwh = {};
require 'json'
# Google Apps Script を「ウェブアプリケーションとして導入」した際に発行されたURL
appUrl = 'https://script.google.com/macros/...../exec'
num = '?num='
uri = '?uri='
mode = ARGV[0]
value = ARGV[1]
var spreadsheet_uri = 'スプレッドシートのURL';
function doGet (e) {
var res = ContentService.createTextOutput();
res.setMimeType(ContentService.MimeType.JAVASCRIPT);
var json = {};
if (e !== undefined && e.parameters !== undefined) {
var uri = (e.parameters.uri !== undefined) ? e.parameters.uri[0] : undefined;
var num = (e.parameters.num !== undefined) ? e.parameters.num[0] : undefined;
var fb = function (n) {
for (var i = 1; i < n; i++) {
if (i % 15 === 0 ) {
console.log("FizzBuzz");
}else if (i % 5 === 0) {
console.log("Buzz");
}else if (i % 3 === 0) {
console.log("Fizz");
}else {
console.log(i);
// 実行方法:
// $ node generate-plantuml.js [RDF形式のテキストファイルパス] > b.plantuml
// このあと、
// $ GRAPHVIZ_DOT=$(which dot) plantuml -charset UTF-8 -tpng b.plantuml
// のように実行して b.png を得る
var fs = require('fs');
var readline = require('readline');
@daiiz
daiiz / maguro.h
Created July 22, 2015 07:21
マグロを表示するマクロ
#define maguro() printf("🍣\n");
@daiiz
daiiz / test.html
Last active August 29, 2015 14:22
divをアニメーション表示できない
<!doctype html>
<html>
<head>
<title>Sample</title>
<style>
#c0, #c1, #c2, #c3 {
height: 100px;
width: 100px;
background-color: #ccc;
}
@daiiz
daiiz / chrome
Last active August 29, 2015 14:20
MacでChromeを起動するためのコマンド
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2015 daiz
# Options:
# s: シークレットモードで起動
# run: 開発中のアプリを読み込む
# Usage: $ chrome run /path/to/app/