Skip to content

Instantly share code, notes, and snippets.

Making GitHub Remote Ops (e.g. git push) Work with 2-Fac Authentication

The following method will let you use ssh keypair to push & pull commits without Personal Access Token, as long as you select "use ssh" instead of "use https" when cloning the repo.

1. Use OS X Keychain as Git credential helper

Install Git and the osxkeychain helper and tell Git to use it.

1. Find out if Git and the osxkeychain helper are already installed:
$ git credential-osxkeychain
@xiangyuanhang
xiangyuanhang / global.xml
Created November 24, 2019 14:55
global.xml
<ObstacleSet type="explicit" class="1">
<Obstacle closed="1" >
<Vertex p_x="-2.000000" p_y="-4.000000" />
<Vertex p_x="-2.000000" p_y="0.000000" />
<Vertex p_x="-7.000000" p_y="0.000000" />
<Vertex p_x="-7.000000" p_y="9.000000" />
<Vertex p_x="-2.000000" p_y="9.000000" />
<Vertex p_x="-2.000000" p_y="13.000000" />
<Vertex p_x="-8.000000" p_y="13.000000" />
<Vertex p_x="-8.000000" p_y="-4.000000" />
@xiangyuanhang
xiangyuanhang / fieldM.txt
Created November 24, 2019 14:54
fieldM.txt
14 12
1.5
-8.50642590769 -5.29629363242
-0.0112293837592 0.999936282635
-0.0435877367854 0.999048888683
-0.0452105402946 0.99897646904
-0.0415199138224 0.999136567116
-0.0253759399056 0.999675571918
-0.0393449142575 0.999223172665
-0.027881398797 0.99960899353
@xiangyuanhang
xiangyuanhang / pedModelSwapS.xml
Created February 10, 2019 02:25
pedModelSwapSdraft
<?xml version="1.0"?>
<Experiment version="2.0">
<SpatialQuery type="kd-tree" test_visibility="false" />
<OpenSteer max_force="8" leak_through="0.1" reaction_time="0.5" />
<Common time_step="0.1" />
<GCF reaction_time="0.5" max_agent_dist="2" max_agent_force="3" agent_interp_width="0.1" agent_force_strength="0.35" />
<Helbing agent_scale="4000" obstacle_scale="2000" reaction_time="0.2" body_force="1200" friction="2400" force_distance="0.02" />
<Johansson agent_scale="35" obstacle_scale="35" reaction_time="0.5" force_distance="0.15" stride_time="0.5" />
<!--<Karamouzas orient_weight="0.8" fov="140" reaction_time="0.4" wall_steepness="2" wall_distance="2" colliding_count="5" d_min="1" d_mid="8" d_max="10" agent_force="4" />-->
@xiangyuanhang
xiangyuanhang / pedModelSwapB.xml
Last active February 11, 2019 16:33
pedModelSwapBdraft
<?xml version="1.0"?>
<BFSM>
<GoalSet id="0">
<Goal id="0" type="point" x="0.0" y="0.0" weight="1.0" />
<Goal id="1" type="AABB" min_x="-1.8" min_y="-1.8" max_x="1.8" max_y="1.8" />
</GoalSet>
<State name="MoveDown" speedPolicy="min" final="0" >
<GoalSelector type="identity" />
<VelComponent type="const_dir" weight="1.0" dist="c" x="0" y="-1" />