Skip to content

Instantly share code, notes, and snippets.

@mizchi
mizchi / how-hooks-work.md
Last active December 24, 2024 01:48
(翻訳) React Hooks は魔法ではなく、ただの配列だ

(翻訳) React Hooks は魔法ではなく、ただの配列だ

この記事は https://medium.com/@ryardley/react-hooks-not-magic-just-arrays-cd4f1857236e の日本語訳です。途中で力尽きて雑な翻訳になってる箇所がいくつかあります。


どのように Hooks が動いているか

私は、新しい Hooks の API の "magic" な挙動に悩んでいる人が結構いると聞いています。なのでこの構文の提案が、少なくとも表面的なレベルではどう動いているか、解説してみようと思います。

@kawasima
kawasima / 00_architecture_corpus.md
Last active October 5, 2023 07:26
アーキテクチャ大全 (未完) のサンプル

アーキテクチャ大全のサンプル

これくらいの実例とともにソリューション選択できるようにしていきたい。

@kazuho
kazuho / git-blame-pr.pl
Last active June 28, 2022 07:15
git-blame by PR #
#! /usr/bin/perl
#
# Written in 2017 by Kazuho Oku
#
# To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
#
use strict;
use warnings;
@sou5534
sou5534 / iehack.scss
Last active June 15, 2021 06:14
Sass(SCSS)でIEハックのmixin設定
/* IEハック用mixin */
@mixin hack($IE-ver: null) {
@if $IE-ver == 'lteIE8' { // IE8以下
@media \0screen\,screen\9 {
@content;
}
}
@else if $IE-ver == 'gteIE9' { // IE9以上
@media screen and (min-width:0\0) {
@content;

Here are my attempts to script an IntelliJ-based IDE.

IDE Scripting Console is backed by JSR-223 (javax.script.*) API.

Groovy, Clojure, JavaScript and other scripting languages may be used.

Open IDE Scripting Console, type a statement, hit Ctrl-Enter to execute the current line or selection.

.profile.language-extension file in the same directory will be executed along with it if present.

@kobakou
kobakou / check-n-select-netprof.sh
Last active August 26, 2019 03:18
add notification
#!/bin/bash
# set AccessPoint uniqe name for switch profile.
apname=SWing
if [ "`networksetup -getairportnetwork en0 | awk '{print $4}'`" = "$apname" ]; then
scselect Intra
osascript -e 'display notification "Intra" with title "NetProf"'
else
scselect Automatic
@grocky
grocky / upsource-aws-setup.md
Created April 24, 2016 20:25
Setting up Jebrains Upsource on AWS

Installing and configuring Upsource on AWS with SSL

Upsource is a tool that brings Jetbrains IDE's code insights to code reviews. Upsource's integration with Jetbrains IDEs and GitHub are some of the most attractive features for us at VideoBlocks since we're heavy users of them both. We currently have over 50 private repos and use IntelliJ, PHPStorm and WebStorm to build our core products. All of our infrastructure is hosted on AWS now, so I decided to get this up and running there for quick evaluation.

Launch an EC2 Instance

This step is straight forward and there are already some good resources for setting up an EC2 instance. I won't go into detail here, but I chose an Ubuntu AMI at a size of M3.large (which is the minimum instance size Jetbrains recommends). We're configuring our security group with the standard HTTP ports (80 and 443) and exposing the standard SSH port 22.

@yano3
yano3 / about_elasticsearch_cluster.md
Last active September 28, 2020 07:52
Elasticsearch クラスタ概説
@BretFisher
BretFisher / .travis.yml
Created February 15, 2016 21:26
Travis-CI Docker Image Build and Push to AWS ECR
sudo: required #is required to use docker service in travis
language: php #can be any language, just php for example
services:
- docker # required, but travis uses older version of docker :(
install:
- echo "install nothing!" # put your normal pre-testing installs here