Skip to content

Instantly share code, notes, and snippets.

View yamaneko1212's full-sized avatar

KANEKO Ryosuke yamaneko1212

View GitHub Profile
@yamaneko1212
yamaneko1212 / pygwalker.html
Created March 15, 2024 15:44
Djnago ViewにPygwalkerを組み込む
<div>
{{ pyg | safe }}
</div>
@yamaneko1212
yamaneko1212 / gist:ccd38e348927f8981943799de1d50f68
Last active March 15, 2024 15:47
aws-vaultを使ってAWSのキーを複数のマシンで共有する方法

aws-vaultを使ってAWSのキーを複数のマシン(Mac前提で有りてあるが、他でも可能)で共有する方法

事前準備

  • aws-vault(brewなどでインストールする)をすべてのマシンにインストールしておく
  • iCloud Driveなどの個人用の共有ドライブをセットアップしておく.
  • シェルの設定ファイル(bashの場合は.bashrc)をすべてのマシンで同期しておく.

既にaws-vaultを使っている場合

@yamaneko1212
yamaneko1212 / rn.en.md
Created December 25, 2020 02:36
[ReactNative] Run Packager Manually

When I debug build and run the app in iPhone Simulator, sometimes the packager doesn't run automatically for some unknown reason. I have to run the packager manually.

$ <YourWorkspace>/node_modules/react-native/scripts/launchPackager.command

I've got this issue with React Native 0.61.5 and 0.63.4 + macOS 10.15.7 + XCode 12.3.

@yamaneko1212
yamaneko1212 / memo.md
Last active March 30, 2024 17:10
M1 Macでx86_64のコンテナイメージをビルドして実行する.

M1 Macでx86_64のDockerコンテナイメージをビルドして実行する.

M1 MacBookAirでamd64(x86_64)のコンテナイメージをビルドして実行する方法を検討しました. 現状Experimentalな機能を使用しているので,プロダクションでの使用は注意してください.

検証環境

@yamaneko1212
yamaneko1212 / multi-lingual.el
Created May 10, 2020 11:46
10年くらい前に書いたelisp. 確か, 選択した領域のテキストをgoogle翻訳APIに送って英訳する拡張.
;;; multi-lingual.el ---
;; Copyright (C) 2010 yamaneko
;; Author: yamaneko <yamaneko1212@gmail.com>
;; Keywords:
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
@yamaneko1212
yamaneko1212 / .hgrc
Created March 26, 2013 10:22
hg serveでpushを受け付ける ref: http://qiita.com/items/985799dd25aecfbd3f5d
[web]
push_ssl = false
allow_push = *
@yamaneko1212
yamaneko1212 / gist:5020175
Last active December 14, 2015 03:19
Is this bug?

Hi. I start to use FreeBSD 9.1 Relese AMI(ami-cef348cf) and found a small problem, /etc/passwd is not updated on the first boot. I think, should call pwd_mkdb in /root/ec2-bits/ec2-user.sh, like below.

15a16
> pwd_mkdb -p $ETCDIR/master.passwd
@yamaneko1212
yamaneko1212 / BlocksWrapper.h
Created February 8, 2012 01:47
Blocksのラッパークラス ref: http://qiita.com/items/2082
#import <Foundation/Foundation.h>
typedef void (^CallableBlock)();
@interface BlocksWrapper : NSObject
@property (strong, nonatomic) CallableBlock blocks;
- (BlocksWrapper *)initWithBlocks:(CallableBlock)blocks;
- (void)invoke;
@yamaneko1212
yamaneko1212 / file0.txt
Created January 31, 2012 21:28
メソッドとかの呼び出し回数をカウント/検証する. ref: http://qiita.com/items/1957
from unittest import TestCase
class CallCounter(object):
"""Check a numbe of time a callable is called."""
def __new__(cls, *args, **kargs):
inst = super(CallCounter, cls).__new__(cls, *args, **kargs)
inst._patch_mgr = PatchManager()
inst._targets = {}
@yamaneko1212
yamaneko1212 / file0.txt
Created December 20, 2011 12:45
7つの言語Clojure1日目セルフスタディ1 ref: http://qiita.com/items/1422
(defn big [st n] (> (count st) n))