Skip to content

Instantly share code, notes, and snippets.

View pistatium's full-sized avatar
🚲
Cycling

kimihiro_n pistatium

🚲
Cycling
View GitHub Profile
@sheepla
sheepla / cd-gitroot.sh
Created September 19, 2021 02:36
Gitリポジトリのrootディレクトリにcdする
#
# cd to root directory on Git repository
#
alias cdgitroot='cd "$(git rev-parse --show-toplevel)"'
@azu
azu / TypeScriptの設定の良し悪し.md
Last active April 1, 2024 10:23
TypeScriptの設定の良し悪し

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

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

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

Realm近況

モバイルDBのRealmっていう製品について、最近の動向を調べた

2016年

  • 初期のSQLite代替というよりFirestoreのようなクラウド同期型DBとして進化している
  • Realm Object Server
@kenmori
kenmori / styled-components-howtouse.md
Last active May 2, 2024 03:48
styled-componentsの使い方(パッとわかりやすく、色々なパターンを説明することを目指しています)

styled-componentsの使い方(パッとわかりやすく、色々なパターンを説明することを目指す記事)

styled-compoents

本家ドキュメント

こちらはStyled-componentsの使い方、ユースケースを集めた端的なページです。
なにかの問題解決、参考になりましたらスターを押してくださいませ。励みになります。
@uemuraj
uemuraj / kishou-xml.md
Last active November 15, 2021 03:21
気象庁防災情報XMLチュートリアル

気象庁防災情報XMLチュートリアル

気象庁防災情報XMLをご存知でしょうか。天気予報や警報を主に、多種多様な情報が気象庁から公開されています。
現在、ユーザ登録をすれば誰でも無料で受け取ることができます。
2020年8月で運用終了しました。

実際、どんな情報が来るのか簡単に見てみましょう。

@PonDad
PonDad / index.js
Created October 8, 2017 02:09
Googleホームアプリ「宿題の時間」のGoogle Cloud Functions実行ファイル
'use strict';
process.env.DEBUG = 'actions-on-google:*';
const App = require('actions-on-google').ApiAiApp;
const exec = require('child_process').exec;
const kinako_adress = "https://xxxxxxxx.ap.ngrok.io/kinako_today"
const anko_adress = "https://xxxxxxxx.ap.ngrok.io/anko_today"
const kinako_adress_2 = "https://xxxxxxxx.ap.ngrok.io/kinako_month"
const anko_adress_2 = "https://xxxxxxxx.ap.ngrok.io/anko_month"
@cketti
cketti / android-26-sources.md
Last active August 14, 2019 12:08
Build your own android-26 sources

If you are annoyed that "Sources for Android 26" are not yet available via SDK manager, this might be for you:

  1. Collect source files
mkdir android-sdk-source-build
cd android-sdk-source-build

mkdir -p frameworks/base
@tobywf
tobywf / clean_old_lambda_versions.py
Last active April 11, 2024 06:52
A quick script to remove old AWS Lambda function versions
from __future__ import absolute_import, print_function, unicode_literals
import boto3
def clean_old_lambda_versions():
client = boto3.client('lambda')
functions = client.list_functions()['Functions']
for function in functions:
versions = client.list_versions_by_function(FunctionName=function['FunctionArn'])['Versions']
for version in versions:
@AAber
AAber / disk_used_alert2slack
Created June 14, 2017 13:38
Script to monitor disk space and alert via slack when disk usage is > 80% Place the script in /etc/cron.hourly
#!/bin/bash
# Parse df selected output
df -h|egrep -v 'File|tmpfs|docker|udev'| \
while read LINE; do
USED_NUMBER=`echo $LINE |awk '{print $5}'|sed 's/\%//'|sed 's/ //g'`
USED_PERCENT=`echo $LINE |awk '{print $5}'|sed 's/ //g'`
MOUNT_POINT=`echo $LINE |awk '{print $6}'|sed 's/ //g'`
if [ $USED_NUMBER -gt 80 ]; then
# Create message without spaces