Skip to content

Instantly share code, notes, and snippets.

View potato2003's full-sized avatar
🏠
Working from home

potato2003

🏠
Working from home
View GitHub Profile
@katai5plate
katai5plate / rar.md
Last active April 17, 2020 01:38
react-app-rewired 動作原理メモ

codes

index

  • paths に加え scriptVersion, configOverrides, customScriptsIndex を返す
1. index.js
  2. scripts/utils/path.js
    3. <prj>/package.json から config-overrides-path を取得
    4. <react-scripts>/config/paths.js から paths を取得

start

@potato2003
potato2003 / setusergroups
Last active March 27, 2019 08:36
ruby 環境で必要だったので、kazuho さんの https://gist.github.com/kazuho/6181648 を参考に書いた。(参考リンク - 2) http://d.hatena.ne.jp/hirose31/20130808/1375965331
#!/usr/bin/env ruby
# usage: setusergroups [-h|--help] username child
#
# setuidgid w. support for supplementary groups
# ruby porting of https://gist.github.com/kazuho/6181648
#
# see: http://d.hatena.ne.jp/hirose31/20130808/1375965331
# see: https://gist.github.com/kazuho/6181648

詳解 WebRTC

更新:2017-09-26
作者:@voluntas
作者サイト:http://voluntas.github.io/
バージョン:1.2.1
セッション日時:2017-09-24 14:20 - 15:00
セッション場所:5号館3F
@fand
fand / codebase_overview.md
Last active December 12, 2016 03:17
ReactのCodebase Overview, Implementation Notes要約

Codebase Overview

https://facebook.github.io/react/contributing/codebase-overview.html

Custom Module System

  • FacebookではHasteというモジュールシステムを使っている
    • all filenames are globally unique
    • require('../foo/bar') の代わりに require('bar') とする
    • ファイル移動しても壊れない
    • Fuzzy Finder使いやすい
  • ビルド時に、全てのファイルを /lib 下にフラットに配置する

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@yuroyoro
yuroyoro / Uber-migrated-pg-to-mysql.md
Created July 27, 2016 06:28
UberのPostgresqlからNoSQL on MySQLへの移行を読んでざっくりまとめた

Why Uber Engineering Switched from Postgres to MySQL - Uber Engineering Blog のまとめ

Posgresqlだと

  • pgは追記型なので少しの更新でも多くのdiskへのwriteがおきる
  • カラムを一つ更新しただけで多くのindexの書き換えが起こる
  • よって、replicationはWALを送るので更新が多いとWALが大量に送られる
  • repcliationでは物理的なdiskの変更を送る
  • DC間でレプリするときつい
  • bugがあってreplica間でMVCCの不整合が起きる
@richhollis
richhollis / add_user_name_to_users.rb
Last active May 9, 2020 07:26
Rails 4.2.5.1 and Devise 3.5.6 using attr_encrypted with email attribute encrypted and username clear text
class AddUserNameForAuthenticationToUsers < ActiveRecord::Migration
def up
add_column :users, :username, :string, null: false, default: ""
add_index :users, :username, unique: true
add_column :users, :encrypted_email, :string
remove_column :users, :email, :string
add_index :users, :encrypted_email
end
def down
remove_column :users, :username
@voluntas
voluntas / realtime_movie_stream.rst
Last active August 5, 2024 09:58
リアルタイム動画配信コトハジメ
@azu
azu / flux-utils.md
Last active August 8, 2018 17:31
flux-utilsについて
@jackghm
jackghm / HP-Vertica-Date-Time.sql
Created August 2, 2015 22:54
Working with HP-Vertica date and time
/*
#1 always write datetime values into the database as UTC!!!
-- Reread that last statement
Vertica will store all datetime values as UTC values
*/
-- I highly recommend storing an Integer column of the Day Date
select TO_CHAR(<% DATA_END_TIME %>::DATE - INTEGER '1', 'YYYYMMDD')::INTEGER AS date_id
SELECT CLOCK_TIMESTAMP() "Current Time"; -- return current time
SELECT NOW(); -- time since last session connection (or commit;) which may be an older time than now