<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://shinkocheng.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://shinkocheng.github.io/" rel="alternate" type="text/html" /><updated>2025-12-26T04:43:02-08:00</updated><id>https://shinkocheng.github.io/feed.xml</id><title type="html">shinkocheng.github.io</title><subtitle>(Fancy description to come soon!)  </subtitle><entry><title type="html">Karabiner, XCode and Logitech Mice: Back/Forward Buttons</title><link href="https://shinkocheng.github.io/workflow/2015/05/28/karabiner-xcode-logitech-mouse.html" rel="alternate" type="text/html" title="Karabiner, XCode and Logitech Mice: Back/Forward Buttons" /><published>2015-05-28T15:46:55-07:00</published><updated>2015-05-28T15:46:55-07:00</updated><id>https://shinkocheng.github.io/workflow/2015/05/28/karabiner-xcode-logitech-mouse</id><content type="html" xml:base="https://shinkocheng.github.io/workflow/2015/05/28/karabiner-xcode-logitech-mouse.html"><![CDATA[<p>Finally got around to understanding Karabiner’s private.xml reference guide. This was the result.</p>

<p>There are three items, mapping buttons 4 and 5 to the keyboard command to “go back” or “go forward” Terminal, Chrome and all other applications, and home/end keys to the keyboard commands specific for Chrome Remote Desktop.</p>

<figure class="highlight"><pre><code class="language-xml" data-lang="xml"><span class="cp">&lt;?xml version="1.0"?&gt;</span>
<span class="nt">&lt;root&gt;</span>
  <span class="nt">&lt;appdef&gt;</span>
    <span class="nt">&lt;appname&gt;</span>XCODE<span class="nt">&lt;/appname&gt;</span>
    <span class="nt">&lt;equal&gt;</span>com.apple.dt.Xcode<span class="nt">&lt;/equal&gt;</span>
  <span class="nt">&lt;/appdef&gt;</span>
  <span class="nt">&lt;appdef&gt;</span>
    <span class="nt">&lt;appname&gt;</span>TERMINAL<span class="nt">&lt;/appname&gt;</span>
    <span class="nt">&lt;equal&gt;</span>com.apple.Terminal<span class="nt">&lt;/equal&gt;</span>
  <span class="nt">&lt;/appdef&gt;</span>
  <span class="nt">&lt;windownamedef&gt;</span>
    <span class="nt">&lt;name&gt;</span>GOOGLECRD<span class="nt">&lt;/name&gt;</span>
    <span class="nt">&lt;regex&gt;</span>- Chrome Remote Desktop<span class="nt">&lt;/regex&gt;</span>
  <span class="nt">&lt;/winownamedef&gt;</span>
  <span class="nt">&lt;windownamedef&gt;</span>
    <span class="nt">&lt;name&gt;</span>GOOGLEMAIL<span class="nt">&lt;/name&gt;</span>
    <span class="nt">&lt;regex&gt;</span>Inbox<span class="nt">&lt;/regex&gt;</span>
  <span class="nt">&lt;/windownamedef&gt;</span>
 
  <span class="nt">&lt;item&gt;</span>
    <span class="nt">&lt;name&gt;</span>Shinko's Custom<span class="nt">&lt;/name&gt;</span>
    <span class="nt">&lt;item&gt;</span>
      <span class="nt">&lt;name&gt;</span>Use Button4/Button5 as Back/Forward except XCode<span class="nt">&lt;/name&gt;</span>
      <span class="nt">&lt;identifier&gt;</span>private.back_forward_with_exceptions<span class="nt">&lt;/identifier&gt;</span>
      <span class="nt">&lt;block&gt;</span>
        <span class="nt">&lt;autogen&gt;</span>__PointingButtonToKey__ PointingButton::BUTTON4,
          KeyCode::BRACKET_LEFT, ModifierFlag::COMMAND_L<span class="nt">&lt;/autogen&gt;</span>
        <span class="nt">&lt;autogen&gt;</span>__PointingButtonToKey__ PointingButton::BUTTON5,
          KeyCode::BRACKET_RIGHT, ModifierFlag::COMMAND_L<span class="nt">&lt;/autogen&gt;</span>
        <span class="nt">&lt;not&gt;</span>XCODE<span class="nt">&lt;/not&gt;</span>
        <span class="nt">&lt;windowname_not&gt;</span>GOOGLECRD<span class="nt">&lt;/windowname_not&gt;</span>
      <span class="nt">&lt;/block&gt;</span>
      <span class="nt">&lt;block&gt;</span>
        <span class="nt">&lt;autogen&gt;</span>__PointingButtonToKey__ PointingButton::BUTTON4,
          KeyCode::CURSOR_LEFT, ModifierFlag::COMMAND_L | ModifierFlag::CONTROL_L<span class="nt">&lt;/autogen&gt;</span>
        <span class="nt">&lt;autogen&gt;</span>__PointingButtonToKey__ PointingButton::BUTTON5,
          KeyCode::CURSOR_RIGHT, ModifierFlag::COMMAND_L | ModifierFlag::CONTROL_L<span class="nt">&lt;/autogen&gt;</span>
        <span class="nt">&lt;only&gt;</span>XCODE<span class="nt">&lt;/only&gt;</span>
      <span class="nt">&lt;/block&gt;</span>
      <span class="nt">&lt;block&gt;</span>
        <span class="nt">&lt;autogen&gt;</span>__PointingButtonToKey__ PointingButton::BUTTON4,
          KeyCode::CURSOR_LEFT, ModifierFlag::OPTION_L<span class="nt">&lt;/autogen&gt;</span>
        <span class="nt">&lt;autogen&gt;</span>__PointingButtonToKey__ PointingButton::BUTTON5,
          KeyCode::CURSOR_RIGHT, ModifierFlag::OPTION_L<span class="nt">&lt;/autogen&gt;</span>
        <span class="nt">&lt;windowname_only&gt;</span>GOOGLECRD<span class="nt">&lt;/windowname_only&gt;</span>
      <span class="nt">&lt;/block&gt;</span>
    <span class="nt">&lt;/item&gt;</span>
    <span class="nt">&lt;item&gt;</span>
      <span class="nt">&lt;name&gt;</span>Replace home/end keys with command-left/command-right<span class="nt">&lt;/name&gt;</span>
      <span class="nt">&lt;identifier&gt;</span>private.home_end_with_exceptions<span class="nt">&lt;/identifier&gt;</span>
      <span class="nt">&lt;block&gt;</span>
        <span class="nt">&lt;autogen&gt;</span>__KeyToKey__ KeyCode::HOME, KeyCode::CURSOR_LEFT | ModifierFlag::COMMAND_L<span class="nt">&lt;/autogen&gt;</span>
        <span class="nt">&lt;autogen&gt;</span>__KeyToKey__ KeyCode::END, KeyCode::CURSOR_RIGHT | ModifierFlag::COMMAND_L<span class="nt">&lt;/autogen&gt;</span>
        <span class="nt">&lt;windowname_not&gt;</span>GOOGLECRD<span class="nt">&lt;/windowname_not&gt;</span>
        <span class="nt">&lt;not&gt;</span>TERMINAL<span class="nt">&lt;/not&gt;</span>
      <span class="nt">&lt;/block&gt;</span>
    <span class="nt">&lt;/item&gt;</span>
    <span class="nt">&lt;item&gt;</span>
        <span class="nt">&lt;name&gt;</span>Use cmd and ctrl synonymously in Chrome Remote Desktop<span class="nt">&lt;/name&gt;</span>
        <span class="nt">&lt;identifier&gt;</span>private.cmd_ctr_synonyms<span class="nt">&lt;/identifier&gt;</span>
    <span class="nt">&lt;autogen&gt;</span>__KeyToKey__ KeyCode::SPACE | ModifierFlag::COMMAND_L, KeyCode::SPACE, ModifierFlag::COMMAND_L<span class="nt">&lt;/autogen&gt;</span>
        <span class="nt">&lt;autogen&gt;</span>__KeyToKey__ KeyCode::COMMAND_L, KeyCode::CONTROL_L<span class="nt">&lt;/autogen&gt;</span>
    <span class="nt">&lt;windowname_only&gt;</span>GOOGLECRD<span class="nt">&lt;/windowname_only&gt;</span>
    <span class="nt">&lt;/item&gt;</span>
  <span class="nt">&lt;/item&gt;</span>
<span class="nt">&lt;/root&gt;</span></code></pre></figure>]]></content><author><name></name></author><category term="workflow" /><summary type="html"><![CDATA[Finally got around to understanding Karabiner’s private.xml reference guide. This was the result.]]></summary></entry><entry><title type="html">X11 connection rejected because of wrong authentication after `sudo` to another user</title><link href="https://shinkocheng.github.io/workflow/2014/08/31/x11-connection-rejected-after-sudo-to-another-user.html" rel="alternate" type="text/html" title="X11 connection rejected because of wrong authentication after `sudo` to another user" /><published>2014-08-31T15:46:55-07:00</published><updated>2014-08-31T15:46:55-07:00</updated><id>https://shinkocheng.github.io/workflow/2014/08/31/x11-connection-rejected-after-sudo-to-another-user</id><content type="html" xml:base="https://shinkocheng.github.io/workflow/2014/08/31/x11-connection-rejected-after-sudo-to-another-user.html"><![CDATA[<p>This is a posting for my reference. I lifted this from <a href="https://jianmingli.com/wp/?p=724">Jianming Li</a> in case one of these days he decides to take it down.</p>

<p>Cause: X win cookie not carried over after sudo login as another user.</p>

<p>Solution: Add the cookie to the other user.</p>

<p>From user1</p>

<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="gp">$</span><span class="w"> </span><span class="nb">echo</span> <span class="nv">$DISPLAY</span>
<span class="go">localhost:10.0

</span><span class="gp">$</span><span class="w"> </span>xauth list
<span class="go">box.my.com/unix:10  MIT-MAGIC-COOKIE-1  4f76c629f8cdbf26ce4ae646cc24448c
box.my.com/unix:11  MIT-MAGIC-COOKIE-1  1acd10ab0fd098a86aba7aa691d7c067
box.my.com/unix:12  MIT-MAGIC-COOKIE-1  e007ee6844c417a6b866d66c7bbcbc7d</span></code></pre></figure>

<p>From User2 (even root)</p>]]></content><author><name></name></author><category term="workflow" /><summary type="html"><![CDATA[This is a posting for my reference. I lifted this from Jianming Li in case one of these days he decides to take it down.]]></summary></entry><entry><title type="html">Scroll through screen buffer in MacOS Terminal</title><link href="https://shinkocheng.github.io/workflow/2013/09/04/scroll-thru-screen-buffer-in-mac-terminal.html" rel="alternate" type="text/html" title="Scroll through screen buffer in MacOS Terminal" /><published>2013-09-04T15:46:55-07:00</published><updated>2013-09-04T15:46:55-07:00</updated><id>https://shinkocheng.github.io/workflow/2013/09/04/scroll-thru-screen-buffer-in-mac-terminal</id><content type="html" xml:base="https://shinkocheng.github.io/workflow/2013/09/04/scroll-thru-screen-buffer-in-mac-terminal.html"><![CDATA[<p>I use screen a lot for work. but when i want to see the history in terminal,
typing <code class="language-plaintext highlighter-rouge">^a-[</code> and then up/down arrow gets tedious in a heartbeat. i discovered
recently that you can put the following command in the <code class="language-plaintext highlighter-rouge">~/.screenrc</code> file in the
machine where screen is run, and you’ll have the capability to scroll through
the history.</p>

<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c"># Make xterm scrolling work properly with screen</span>
termcapinfo xterm-256color|xterm-color|xterm|xterms|xs|rxvt ti@:te@</code></pre></figure>]]></content><author><name></name></author><category term="workflow" /><summary type="html"><![CDATA[I use screen a lot for work. but when i want to see the history in terminal, typing ^a-[ and then up/down arrow gets tedious in a heartbeat. i discovered recently that you can put the following command in the ~/.screenrc file in the machine where screen is run, and you’ll have the capability to scroll through the history.]]></summary></entry><entry><title type="html">Theory, Model, Data</title><link href="https://shinkocheng.github.io/research/2011/11/18/theory-model-data.html" rel="alternate" type="text/html" title="Theory, Model, Data" /><published>2011-11-18T14:46:55-08:00</published><updated>2011-11-18T14:46:55-08:00</updated><id>https://shinkocheng.github.io/research/2011/11/18/theory-model-data</id><content type="html" xml:base="https://shinkocheng.github.io/research/2011/11/18/theory-model-data.html"><![CDATA[<p>A successful research project requires 3 components: Theory, Model and
Data. The definitions of these words from conversations with others
are these.</p>

<p><strong>Theory</strong> is the concept or idea that leveraged or to be tested (demonstrated).</p>

<p><strong>Model</strong> is the system or a series of processes such as an algorithm that
implements or tests (demonstrates) the theory.</p>

<p><strong>Data</strong> is the test results demonstrating the efficacy of using the model,
thereby also confirming the theory.</p>

<p>In the paper on Shape-Carving by Kutulakos, the theory is the principle of
having each ray of light from the surface of the object agree in color, and by
starting with a volume larger than the actual volume of the object and carving
away voxel by voxel, the outcome is necessarily an overestimate of the actual
object volume. The model is the algorithm that implements the shape-carving
algorithm. The data are the volumetric reconstructions resulting from this
method as well as any special parameter value used in the tests. Since the data
shows that the method  can compute the volumetric reconstructions successfully,
the data also confirms the theory that reconstructions can be obtained by
carving away at a volume larger than the actual object by keeping only voxels
that agree in color among its many camera projections.</p>

<p>Data doesn’t come cheaply.</p>]]></content><author><name></name></author><category term="research" /><summary type="html"><![CDATA[A successful research project requires 3 components: Theory, Model and Data. The definitions of these words from conversations with others are these.]]></summary></entry></feed>