Skip to content

Instantly share code, notes, and snippets.

View TinyKitten's full-sized avatar
🚧
Rebuilding

Tsubasa SEKIGUCHI TinyKitten

🚧
Rebuilding
View GitHub Profile
@niw
niw / README.en.md
Last active May 10, 2024 05:50
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!

NOTE: that this is current, 10/1/2021 state.

Running Windows 10 on ARM

  1. Install Xcode from App Store or install Command Line Tools on your Mac
@MonsieurV
MonsieurV / createImageBitmap.js
Last active February 16, 2021 11:04
createImageBitmap polyfill with Blob and ImageData source support
/*
* Safari and Edge polyfill for createImageBitmap
* https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap
*
* Support source image types Blob and ImageData.
*
* From: https://dev.to/nektro/createimagebitmap-polyfill-for-safari-and-edge-228
* Updated by Yoan Tournade <yoan@ytotech.com>
*/
if (!('createImageBitmap' in window)) {
@fukuiretu
fukuiretu / index.d.ts
Last active November 27, 2021 15:57
Nuxt.jsで必要なTypeScriptの型定義
import Vue from 'vue'
import { Route } from 'vue-router'
import { Store } from 'vuex'
import { MetaInfo } from 'vue-meta'
import { AxiosInstance } from 'axios'
interface NuxtContext {
isClient: boolean
isServer: boolean
isStatic: boolean
from itertools import islice
import firebase_admin
from firebase_admin import credentials
from firebase_admin import db
from firebase_admin import firestore
def _split(data, size=500):
"""Splits a dictionary into a sequence of smaller dictionaries."""
@mkamakura
mkamakura / firebase.json
Created December 17, 2017 03:35
[Firebase Hosting,Functions] basic認証付きでサイトを公開する
{
"hosting": {
"public": "public",
"rewrites": [
{
"source": "**",
"function": "app"
}
],
"redirects": [{
@pine
pine / AdventCalendar_KUT_20171217.md
Last active April 7, 2024 07:46
猿でも分かるプッシュ通知
@mohakshah
mohakshah / Instructions.md
Last active July 15, 2023 04:58
Building ZFS on Raspberry Pi 3 running Rasbpian

Introduction

This is a tutorial for building and installing the latest release version (0.7.3 as of writing) of "ZFS on Linux" on a Raspberry Pi 3 running Raspbian Stretch. Specifically, we'll be building the dkms version of ZoL, which saves you the hassle of re-compiling the kernel modules after every kernel update. Even though ZoL added support for building dkms packages for debian in version 0.7.3, the build process on a Raspberry Pi 3 is not quite straight-forward. Hopefully, these instructions will make it easier.

Steps

  1. Install the build dependencies.
$ sudo apt-get update
$ sudo apt-get install build-essential autoconf libtool gawk alien fakeroot
$ sudo apt-get install dkms zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev parted lsscsi wget ksh
@remy
remy / next.config.js
Created July 18, 2017 18:37
Next.js configuration for dotenv and custom servers.
const webpack = require('webpack');
require('dotenv').config({
path: process.env.NODE_ENV === 'production' ? '.env.production' : '.env'
});
module.exports = {
webpack: config => {
const env = Object.keys(process.env).reduce((acc, curr) => {
acc[`process.env.${curr}`] = JSON.stringify(process.env[curr]);
@ryboe
ryboe / .travis.yml
Last active November 23, 2023 05:37
Example .travis.yml for Golang
# use the latest ubuntu environment (18.04) available on travis
dist: bionic
language: go
# You don't need to test on very old versions of the Go compiler. It's the user's
# responsibility to keep their compiler up to date.
go:
- 1.16.x
@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).