Skip to content

Instantly share code, notes, and snippets.

View fukata's full-sized avatar

fukata fukata

View GitHub Profile
@fukata
fukata / chat.openai.com.css
Last active April 16, 2023 00:17
ChatGPTの会話部分をウィンドウ幅に広げるCSS
@-moz-document url-prefix("https://chat.openai.com/") {
.text-base {
max-width: 100% !important;
}
.h-full {
height: auto !important;
}
div[class^=react-scroll-to-bottom--css-vsfma-] {
height: auto !important;
overflow-y: auto !important;
$node src/chat.js
あなた: おすすめのパスタを教えてください。
AI:

私はAIのため選べませんが、一般的な人気のあるパスタレシピとしては、

・トマトソーススパゲッティ
・カルボナーラ
・アラビアータ
<template>
<div>
<div id="world_map" style="width: 100%; height: 100vh; background-color: #ccc;"></div>
</div>
</template>
<script setup lang="ts">
import { onMounted } from 'vue';
import * as am5 from '@amcharts/amcharts5';
import * as am5map from '@amcharts/amcharts5/map';
<template>
<div>
<div class="speed-dial-modal-layer" v-if="isOpen"></div>
<div class="speed-dial">
<div
:class="['speed-dial-action', toggleClass, {'hide': isHideAction}]"
v-for="(action, idx) in actions"
:key="idx"
@click="onClickAction(action)"
>
@fukata
fukata / init.lua
Created December 26, 2022 01:26
hammerspoon config
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "Left", function()
local win = hs.window.focusedWindow()
local f = win:frame()
local screen = win:screen()
local max = screen:frame()
f.x = max.x
f.y = max.y
f.w = max.w / 2
f.h = max.h
@fukata
fukata / tweet.rb
Created October 3, 2022 07:21
Tweet by Twitter API v2
#!/usr/bin/env ruby
require 'oauth'
require 'json'
require 'typhoeus'
require 'oauth/request_proxy/typhoeus_request'
def create_tweet(url, oauth_params, payload)
options = {
method: :post,
---
region:
- name: 北ヨーロッパ
countries:
- name: アイスランド
name_en: Iceland
alpha2: IS
- name: オーランド諸島
name_en: Åland Islands
alpha2: AX
@fukata
fukata / image_uploader.rb
Last active July 30, 2022 16:15
Retryable CarrierWave::Storage::Fog
class ImageUploader < CarrierWave::Uploader::Base
storage RetryableStorageFog
cache_storage RetryableStorageFog
end
@fukata
fukata / main.dart
Last active March 21, 2022 03:05
Windowsの壁紙を変更する
/// 現在の壁紙のファイルパス
String wallpaperFilePath = path.join(
"path", "to", "wallpaper.jpg");
/// 壁紙を変更するボタンが押された時の処理。
void _handleChangeWallpaper() {
var file = File(wallpaperFilePath);
if (!file.existsSync()) {
// ファイルが存在しない
log("画像が存在しない。 filePath=$wallpaperFilePath");
@fukata
fukata / RESULT.md
Last active February 6, 2021 00:36
MySQLのJSON型を使ってみる

バージョン

  • MySQL: 8.0.18

テーブル

mysql> show create table users;
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                                                                                                                                                                       |