Skip to content

Instantly share code, notes, and snippets.

View kk6's full-sized avatar
🐾
Playing with my cat.

kk6 kk6

🐾
Playing with my cat.
View GitHub Profile
@ytsuboi
ytsuboi / 2fa-cli.md
Last active July 2, 2021 05:26
GitHubの2段階認証を有効にした状態で、repositoryの操作をコマンドラインで行うためのメモ

二段階認証を有効にする方法

2段階認証を有効にする方法は適当にググってください。 たしか、ログインした状態で、右上のアイコンの右にある▼をクリック、Settings→Securityに「Two-factor authentication」という設定項目があるはずです。 Google Authenticatorなどの、RFC 6238 Time-Based One-Time Password Algorithmを搭載したトークン発生器を用意しておいてください。

ただし、二段階認証を有効にすると、コマンドラインでgit cloneしたり、push、pullなどの操作を行おうとすると、認証で蹴られるようになります。

二段階認証を有効にした場合のgitコマンドでの操作

二段階認証を有効にしたら、GitHubのウェブで、Personal Access Tokenを取得して、これを使います。 GitHubのCreating an access token for command-line useに書いてありますが、二段階認証を有効にしたときと同じく、ログインした状態で右上のアイコンの右にある▼をクリックし、「Personal access tokens」という項目でトークンの発行が可能です。

@rochacbruno
rochacbruno / mainpython.md
Last active July 5, 2023 10:56
Use of __main__.py

The use of __main__.py to create executables

myprojectfolder/
    |_ __main__.py
    |_ __init__.py

Being __main__.py:

print("Hello")

@z0w0
z0w0 / rustpkg.md
Last active October 19, 2020 14:45
What's Rustpkg?

What's Rustpkg?

Rustpkg is a revamp of Cargo that brings awesome new features such as a build system described in build scripts. It's a purely functional package manager that has no central sources of any kind, but rather installs via URLs. It's similar to how Go's go get tool works, except Rustpkg requires a central metadata file (pkg.rs) in the repository, archive or folder in order to figure out how to build the package. This is a side effect of Rustpkg allowing multiple crates to be defined in a single package (i.e. a package is defined as a set of crates rather than a package being exactly the same as one crate). There's a plan to make it so the pkg.rs is not needed for single-crate packages,

@hayajo
hayajo / changelog_en.md
Last active May 3, 2024 08:29
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

from fnmatch import fnmatch
def check_pdb(ui, repo, hooktype, node=None, source=None, **kwargs):
for file in [f for f in repo[node].files() if fnmatch(f, '*.py')]:
# ファイルごとにチェック
@troter
troter / mercurial-introduction.rst
Created October 30, 2011 09:51
SCMBC #2 Mercurial入門セッション資料(のたたき台) move to https://bitbucket.org/troter/scmbc-2011.11-mercurial-introsession

Mercurial 入門セッション資料

この資料について

  • SCMBC #2 Mercurial 入門セッション資料(のたたき台)です。
  • TODO たとえ話募集中

(おまけ)分散バージョン管理全般の利点

@rhysd
rhysd / .vimrc
Created October 11, 2011 15:33
my vim setting
let mapleader = ','
syntax on
"行番号表示
set number
"バックアップファイルいらない
set nobackup
"vi協調モードoff
set nocompatible
"自動インデント