Skip to content

Instantly share code, notes, and snippets.

@toricls
toricls / lima-on-m1-mac-installation-guide.md
Last active November 9, 2024 23:03
Using Lima to run containers with containerd and nerdctl (without Docker Desktop) on M1 Macs

Lima (Linux virtual machines, on macOS) installation guide for M1 Mac.

Sep. 27th 2021 UPDATED

Now we can install patched version of QEMU via Homebrew (thank you everyone for the info!). Here is the updated instruction with it:

Used M1 Mac mini 2020 with macOS Big Sur Version 11.6.

1. Install QEMU & Lima

@azu
azu / TypeScriptの設定の良し悪し.md
Last active February 14, 2025 10:38
TypeScriptの設定の良し悪し

tsconfig.json の設定についてのメモ書きです。

Node.jsのバージョンごとの設定

target は 変換後のコードのECMAScriptバージョンを指定する たとえば、Node.js 14はES2020をサポートしている。そのため、Node.js 14向けのコード(サーバなど)ならtarget: "ES2020"を指定することで、余計なTranspileが省かれててコードサイズや実行時間が最適化される。

import React, { useEffect, useRef } from 'react';
import ReactDOM from 'react-dom';
import { defineComponent, onMounted, onUnmounted } from '@vue/composition-api';
import Vue from 'vue';
export function vuenize(component: React.ComponentType, parentData: Vue.VNodeData = {}) {
const randomKey = 'key_' + Math.random();
let mountedNode: any = null;
return defineComponent({
name: component.name || component.displayName,
@mala
mala / 202012_smooz.md
Last active October 6, 2022 14:28
Smoozサービス終了に寄せて

Smoozサービス終了に寄せて

前置き

  • この文章と、それに含まれる考察や各サービスへの脆弱性報告などはmala個人の活動であり、所属している企業とは関係ありません。
  • 一方で私は、企業が閲覧履歴を収集して何をしたいのか、所属してる企業や他社事例について、ある程度詳しい当事者でもあります。
  • 一般論として書けることは書けるが、(業務上知り得た知識で開示されてないものなど)個別具体的なことは書けないこともあり、また観測範囲に偏りがある可能性もあります。

Smoozに報告した脆弱性2件

@themarcba
themarcba / README.txt
Last active February 21, 2025 09:53
Vue.js Global - Vue 3 Reactivity Under The Hood
This is an addition to my Vue.js Global 2020 talk about Vue 3 Reactivity.
Some people asked for the slides. You can find them here:
https://marcbackes.com/d8qaLT
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@tonkotsuboy
tonkotsuboy / ObjectValueType.ts
Last active June 8, 2022 01:54
Objectのvalueからなるunion型のエイリアス
// Objectのvalueからなるunion型のエイリアス
type ObjectValueType<T> = T[keyof T];
// 使い方
const MyFood = {
Food1: "ラーメン",
Food2: "カツ丼",
Food3: "ビャンビャン麺",
} as const;
@kamranayub
kamranayub / next.config.js
Last active September 20, 2023 20:45
React Production Profiling Support for Next.js
//
// See: https://kentcdodds.com/blog/profile-a-react-app-for-performance#build-and-measure-the-production-app
// See: https://nextjs.org/docs/api-reference/next.config.js/custom-webpack-config
const TerserPlugin = require('next/dist/compiled/terser-webpack-plugin');
module.exports = {
webpack: (config, options) => {
//
// Use profiler-enabled React builds
@engr-ch
engr-ch / gas_line.gs.js
Created May 17, 2020 08:32
GoogleAppScriptを使用してGoogleSpreadSheetのデータをLineへ通知します
function main() {
const prop = PropertiesService.getScriptProperties().getProperties();
const post_data = getPostData(prop);
if (post_data){
sendPostContent(prop, post_data);
}
}
function getPostData(prop){
const spsheet = SpreadsheetApp.openById(prop.spid);
@minop1205
minop1205 / conventional-commits.md
Last active April 11, 2025 14:05
コミットメッセージ規約