<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Programming on Raveen Kumar</title>
    <link>https://raveenkumar.com/library/programming/</link>
    <description>Recent content in Programming on Raveen Kumar</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <copyright>Raveen Kumar</copyright>
    <lastBuildDate>Sat, 18 Feb 2023 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://raveenkumar.com/library/programming/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>AWK</title>
      <link>https://raveenkumar.com/library/programming/awk/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/awk/</guid>
      <description>&lt;h2 id=&#34;example-1&#34;&gt;Example 1&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;awk -F &#39;,&#39; &#39;{print $NF}&#39; {{filename}}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;To print only rows with columns matching a specific string&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;awk &#39;$3 == &amp;quot;hello&amp;quot;&#39; file&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This will match with,&#xA;&lt;code&gt;1 2 hello something&lt;/code&gt;&#xA;but not with,&#xA;&lt;code&gt;1 2 world something&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;example-2-awking-and-cutting-some-stuff&#34;&gt;Example 2: Awking and cutting some stuff&lt;/h2&gt;&#xA;&lt;p&gt;Lets assume that you want to print the 1st and 3rd field in one line.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;echo &amp;quot;A:B:C:D:E:F:G&amp;quot; | awk -F &#39;:&#39; &#39;ORS=&amp;quot; &amp;quot; {print $1} {print $3}&#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Here ORS stands for, The output record separator, by default its a newline.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cat</title>
      <link>https://raveenkumar.com/library/programming/cat/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/cat/</guid>
      <description>&lt;h2 id=&#34;join-multimedia-files&#34;&gt;Join multimedia files&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;cat movie.mpeg.0* &amp;gt; movie.mpeg&#xA;cat *mp3 &amp;gt; combined.mp3&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Coding Guidelines</title>
      <link>https://raveenkumar.com/library/programming/coding-guidelines/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/coding-guidelines/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;First rule of coding, do not code&lt;/li&gt;&#xA;&lt;li&gt;Second rule of coding, write less code whenever you can&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>cp</title>
      <link>https://raveenkumar.com/library/programming/cp/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/cp/</guid>
      <description>&lt;h2 id=&#34;dereference--follow-and-copy-symbolic-links&#34;&gt;Dereference / follow and copy symbolic links&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;cp -L source dest&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;copy-only-file-that-do-not-exist-in-the-destination-directory---update&#34;&gt;COPY ONLY FILE THAT DO NOT EXIST IN THE DESTINATION DIRECTORY - UPDATE&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;cp -u *.html destination&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cut</title>
      <link>https://raveenkumar.com/library/programming/cut/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/cut/</guid>
      <description>&lt;h2 id=&#34;cut-from-25th-column&#34;&gt;Cut from 25th column&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://superuser.com/questions/316785/is-there-a-diff-utility-that-allows-you-to-exclude-columns&#34;&gt;https://superuser.com/questions/316785/is-there-a-diff-utility-that-allows-you-to-exclude-columns&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cut -c25- file.txt&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;cut-fields&#34;&gt;Cut fields&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;echo &amp;quot;1:2:3&amp;quot; | cut -d &amp;quot;:&amp;quot; -f 1&#xA;&#xA;1&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>du</title>
      <link>https://raveenkumar.com/library/programming/du/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/du/</guid>
      <description>&lt;h2 id=&#34;find-size-of-all-files-and-directories-under-current-directory-and-sort-it-based-on-size&#34;&gt;Find size of all files and directories under current directory and sort it based on size&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;du -sh * | sort -h&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>FFMPEG notes</title>
      <link>https://raveenkumar.com/library/programming/ffmpeg/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/ffmpeg/</guid>
      <description>&lt;h2 id=&#34;basic-usage&#34;&gt;Basic usage&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;ffmpeg -i input.mp4 output.mp4&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;scale-video-to-height-1080p&#34;&gt;Scale video to height 1080p&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;ffmpeg -i input.mp4 -vf &amp;quot;scale=-2:1080&amp;quot; output.mp4&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;remove-audio-track-from-a-video-file&#34;&gt;Remove audio track from a video file&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;ffmpeg -i input.mp4 -an output.mp4&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;slow-down-a-video&#34;&gt;Slow down a video&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video&#34;&gt;https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;ffmpeg -i &amp;quot;$infile&amp;quot; -filter:v &amp;quot;setpts=2.0*PTS&amp;quot; &amp;quot;slowmo-$infile&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;interpolate-videos-to-high-fps&#34;&gt;Interpolate videos to high fps&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;ffmpeg -i input.mkv -filter:v &amp;quot;minterpolate=&#39;mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=120&amp;quot; output.mkv&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;concat-video-files&#34;&gt;Concat video files&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;# mylist.txt file format&#xA;# this is a comment&#xA;file &#39;/path/to/file1.mp4&#39;&#xA;file &#39;/path/to/file2.mp4&#39;&#xA;file &#39;/path/to/file3.mp4&#39;&#xA;&#xA;ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;cut-video-files&#34;&gt;Cut video files&lt;/h2&gt;&#xA;&lt;p&gt;Following example cuts a video from 5 seconds to 10 seconds and exports&#xA;it. Alternatively, use this software&lt;/p&gt;</description>
    </item>
    <item>
      <title>Locate</title>
      <link>https://raveenkumar.com/library/programming/locate/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/locate/</guid>
      <description>&lt;h2 id=&#34;description&#34;&gt;Description&lt;/h2&gt;&#xA;&lt;p&gt;Locate is a alternative to find for files.&#xA;Locate uses &lt;code&gt;updatedb&lt;/code&gt; command to update its database.&#xA;Note that we must run the &lt;code&gt;updatedb&lt;/code&gt; command everytime there is file&#xA;system change.&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&lt;h3 id=&#34;create-a-database&#34;&gt;Create a database&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;updatedb&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;locate-files&#34;&gt;Locate files&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;locate filename&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;create-a-database-locally&#34;&gt;Create a database locally&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;updatedb_path=&amp;quot;$HOME/.local/locate_db&amp;quot;&#xA;updatedb_home=&amp;quot;$updatedb_path/home.db&amp;quot;&#xA;updatedb -l 0 -o &amp;quot;$updatedb_home&amp;quot; -U ~/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;locate-files-for-locally-created-database&#34;&gt;Locate files for locally created database&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;locate -d &amp;quot;$updatedb_home&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>pandoc</title>
      <link>https://raveenkumar.com/library/programming/pandoc/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/pandoc/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://pandoc.org/MANUAL.html&#34;&gt;https://pandoc.org/MANUAL.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;pandoc -o output.html input.txt&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Powershell notes</title>
      <link>https://raveenkumar.com/library/programming/powershell/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/powershell/</guid>
      <description>&lt;h2 id=&#34;winget&#34;&gt;Winget&lt;/h2&gt;&#xA;&lt;p&gt;To install any program using powershell in similar way to linux use, &lt;code&gt;winget&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;winget install pandoc&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Sed</title>
      <link>https://raveenkumar.com/library/programming/sed/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/sed/</guid>
      <description>&lt;h2 id=&#34;to-replace-text&#34;&gt;To replace text&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;sed &#39;s/text/replacement_text/g&#39; &amp;lt;file_name&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;to-replace-text-and-write-file&#34;&gt;To replace text and write file&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;sed -i &#39;s/text/replacement_text/g&#39; &amp;lt;file_name&amp;gt;&lt;/code&gt; ** Append to beginning&#xA;of a file sed -i &amp;lsquo;1i text&amp;rsquo; file.txt * &lt;a href=&#34;https://raveenkumar.com/library/programming/linux/&#34;&gt;back&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;find-and-replace-a-specific-line-from-all-files-in-current-directory-matching-a-specific-extension&#34;&gt;Find and replace a specific line from all files in current directory matching a specific extension&lt;/h2&gt;&#xA;&lt;p&gt;Here, all .md files have&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;lt;a id=&amp;#34;org55550fd&amp;#34;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Line in it. The following command deletes those lines from all the files.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find . -iname &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;*.md&amp;#34;&lt;/span&gt; -exec sed -i &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;/&amp;lt;a id=*/d&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;{}&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;\;&lt;/span&gt;    &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>TMUX</title>
      <link>https://raveenkumar.com/library/programming/tmux/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/tmux/</guid>
      <description>&lt;p&gt;The greatest samurai to ever exist?&lt;/p&gt;&#xA;&lt;h2 id=&#34;tmux-plugins&#34;&gt;TMUX plugins&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/tmux-plugins/tpm&#34;&gt;GitHub - tmux-plugins/tpm: Tmux Plugin Manager&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/tmux-plugins/tmux-urlview&#34;&gt;GitHub - tmux-plugins/tmux-urlview: Quickly open any url on your terminal window!&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/tmux-plugins/tmux-resurrect&#34;&gt;GitHub - tmux-plugins/tmux-resurrect: Persists tmux environment across system restarts.&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;to-move-a-pane-from-another-window-to-current-window&#34;&gt;To move a pane from another window to current window&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;join-pane -s target-window:target-pane&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;to-use-256-colours-in-tmux&#34;&gt;To use 256 colours in Tmux&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://sanctum.geek.nz/arabesque/256-colour-terminals/#:~:text=To%20use%20256%20colours%20in%20Tmux%2C%20you%20should,colour231%20in%20your%20status%20lines%20and%20other%20configurations&#34;&gt;256 colours in TMUX&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;You should set the default terminal in &lt;code&gt;.tmux.conf&lt;/code&gt; to be&#xA;screen-256color,&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;set -g default-terminal &amp;quot;screen-256color&amp;quot;&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Windows WSL Notes</title>
      <link>https://raveenkumar.com/library/programming/windows-wsl/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/windows-wsl/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://thomasward.com/wsl2-x11/&#34;&gt;https://thomasward.com/wsl2-x11/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;change-password&#34;&gt;Change password&lt;/h2&gt;&#xA;&lt;h3 id=&#34;to-change-to-root-user&#34;&gt;To change to root user&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;ubuntu config --default-user root&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;to-change-password&#34;&gt;To change password&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;passwd, passwd &amp;lt;user_name&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;open-windows-gui-applications-with-linux-command-line&#34;&gt;Open Windows GUI applications with Linux command line&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;mspaint.exe file.png&#xA;notepad.exe file.txt&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://dev.to/adityakanekar/upgrading-from-wsl1-to-wsl2-1fl9&#34;&gt;https://dev.to/adityakanekar/upgrading-from-wsl1-to-wsl2-1fl9&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>bc</title>
      <link>https://raveenkumar.com/library/programming/bc/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/bc/</guid>
      <description>&lt;h2 id=&#34;bc-as-a-hex-calculator&#34;&gt;bc as a hex calculator&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;obase=16&#xA;ibase=16&#xA;9+1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;bc-fractional&#34;&gt;bc fractional&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;scale=10&#xA;1/3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;evaluating-expressions-from-commandline&#34;&gt;Evaluating expressions from commandline&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;bc &amp;lt;&amp;lt;&amp;lt; &amp;quot;ibase=10; obase=16; $(grep cru_spare -r | awk -F &amp;quot;,&amp;quot; &#39;{print $NF}&#39;)&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>C&#43;&#43; notes</title>
      <link>https://raveenkumar.com/library/programming/c&#43;&#43;/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/c&#43;&#43;/</guid>
      <description>&lt;h2 id=&#34;for-loops&#34;&gt;For loops&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;for (uint32_t i=0; i&amp;lt;10; i++) {&#xA;printf(&amp;quot;i = %d&amp;quot;, i);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;prints&#34;&gt;Prints&lt;/h2&gt;&#xA;&lt;p&gt;printf(&amp;ldquo;unsigned = %u&amp;rdquo;, var1);&#xA;printf(&amp;ldquo;signed   = %d&amp;rdquo;, var1);&lt;/p&gt;&#xA;&lt;h2 id=&#34;functions&#34;&gt;Functions&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://softwareengineering.stackexchange.com/questions/286490/what-is-the-difference-between-function-and-functionvoid&#34;&gt;https://softwareengineering.stackexchange.com/questions/286490/what-is-the-difference-between-function-and-functionvoid&lt;/a&gt;&#xA;6.7.6.3 Function declarators (including prototypes)&#xA;10 The special case of an unnamed parameter of type void as the only item in the list specifies that the function has no parameters.&#xA;14 An identifier list declares only the identifiers of the parameters of the function. An empty list in a function declarator that is part of a definition of that function specifies that the function has no parameters. The empty list in a function declarator that is not part of a definition of that function specifies that no information about the number or types of the parameters is supplied.145)&lt;/p&gt;</description>
    </item>
    <item>
      <title>ctags</title>
      <link>https://raveenkumar.com/library/programming/ctags/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/ctags/</guid>
      <description>&lt;h2 id=&#34;basics&#34;&gt;Basics&lt;/h2&gt;&#xA;&lt;p&gt;Ctags is a tool that makes it easy to navigate large source code projects. It provides some of the features that you may be used to using in Eclipse or other IDEs, such as the ability to jump from the current source file to definitions of functions and structures in other files.&lt;/p&gt;&#xA;&lt;p&gt;For full info refer this link, &lt;a href=&#34;https://courses.cs.washington.edu/courses/cse451/10au/tutorials/tutorial_ctags.html&#34;&gt;https://courses.cs.washington.edu/courses/cse451/10au/tutorials/tutorial_ctags.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;commands&#34;&gt;Commands&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cd $REPO_ROOT&#xA;ctags -R *&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In vim&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:! ctag -R *&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Add the tags file to vimrc&lt;/p&gt;</description>
    </item>
    <item>
      <title>Diff</title>
      <link>https://raveenkumar.com/library/programming/diff/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/diff/</guid>
      <description>&lt;h2 id=&#34;to-diff-2-files&#34;&gt;To diff 2 files&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;diff file1 file2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;to-diff-2-files-and-view-side-by-side&#34;&gt;To diff 2 files and view side by side&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;diff -y file1 file2&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Documentation notes</title>
      <link>https://raveenkumar.com/library/programming/documentation/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/documentation/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://documentation.divio.com/&#34;&gt;https://documentation.divio.com/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://labs.quansight.org/blog/2020/03/documentation-as-a-way-to-build-community&#34;&gt;Documentation as a way to build community&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Emacs lisp / elisp</title>
      <link>https://raveenkumar.com/library/programming/elisp-snippets/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/elisp-snippets/</guid>
      <description>&lt;h2 id=&#34;open-messages-buffer-in-a-popup-window-below&#34;&gt;Open messages buffer in a popup window below&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; ((messages-buffer (get-buffer &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;*Messages*&amp;#34;&lt;/span&gt;)))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (display-buffer-at-bottom messages-buffer&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#39;&lt;/span&gt;(display-buffer-pop-up-window&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (window-height &lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.2&lt;/span&gt;))))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Errors and bugs</title>
      <link>https://raveenkumar.com/library/programming/errors/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/errors/</guid>
      <description>&lt;h2 id=&#34;removing-old-name-device-or-resource-busy&#34;&gt;Removing old name: Device or resource busy&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://unix.stackexchange.com/questions/11238/how-to-get-over-device-or-resource-busy&#34;&gt;https://unix.stackexchange.com/questions/11238/how-to-get-over-device-or-resource-busy&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The tool you want is lsof, which stands for list open files.&lt;/p&gt;&#xA;&lt;p&gt;It has a lot of options, so check the man page, but if you want to see all open files under a directory:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;lsof +D /path&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;That will recurse through the filesystem under /path, so beware doing it on large directory trees.&lt;/p&gt;&#xA;&lt;p&gt;Once you know which processes have files open, you can exit those apps, or kill them with the kill(1) command.&lt;/p&gt;</description>
    </item>
    <item>
      <title>General programming notes</title>
      <link>https://raveenkumar.com/library/programming/general-programming-notes/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/general-programming-notes/</guid>
      <description>&lt;h2 id=&#34;file-structure&#34;&gt;File structure&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Always try to keep files in one directory, but name them properly&lt;/li&gt;&#xA;&lt;li&gt;Use multiple directories to dump similar data&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;json&#34;&gt;json&lt;/h2&gt;&#xA;&lt;p&gt;Cannot use bash variables inside json files&lt;/p&gt;</description>
    </item>
    <item>
      <title>ImageMagick</title>
      <link>https://raveenkumar.com/library/programming/imagemagick-notes/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/imagemagick-notes/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Adding blur effect to images&lt;/strong&gt;&#xA;&lt;code&gt;convert input.jpg -blur 0x8 output.jpg&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Convert a series of images to gifs&lt;/strong&gt;&#xA;&lt;code&gt;convert -delay 100 -loop 0 image* animation.gif&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Javascript</title>
      <link>https://raveenkumar.com/library/programming/javascript/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/javascript/</guid>
      <description>&lt;h2 id=&#34;reading-materials&#34;&gt;Reading Materials&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server&#34;&gt;How do you set up a local testing server? - Learn web development | MDN&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics&#34;&gt;https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics&lt;/a&gt;&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;document.&lt;span style=&#34;color:#a6e22e&#34;&gt;querySelector&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;html&amp;#34;&lt;/span&gt;).&lt;span style=&#34;color:#a6e22e&#34;&gt;addEventListener&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;click&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt; () {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#a6e22e&#34;&gt;alert&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Ouch! Stop poking me!&amp;#34;&lt;/span&gt;);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The function we just passed to &lt;code&gt;addEventListener()&lt;/code&gt; here is called an &lt;em&gt;anonymous function&lt;/em&gt;, because it doesn&amp;rsquo;t have a name. There&amp;rsquo;s an alternative way of writing anonymous functions, which we call an &lt;em&gt;arrow function&lt;/em&gt;. An arrow function uses &lt;code&gt;() =&amp;gt;&lt;/code&gt; instead of &lt;code&gt;function ()&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;document.querySelector(&amp;#34;html&amp;#34;).addEventListener(&amp;#34;click&amp;#34;, () =&amp;gt; {&#xA;  alert(&amp;#34;Ouch! Stop poking me!&amp;#34;);&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Less</title>
      <link>https://raveenkumar.com/library/programming/less/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/less/</guid>
      <description>&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;less filename&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;chop-long-lines-with-less&#34;&gt;Chop long lines with &lt;code&gt;less&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;less -S filename&lt;/code&gt;&#xA;Note that -S at the end doesnot work&lt;/p&gt;</description>
    </item>
    <item>
      <title>Linux notes general</title>
      <link>https://raveenkumar.com/library/programming/linux/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/linux/</guid>
      <description>&lt;h2 id=&#34;commands&#34;&gt;Commands&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;cat - contatenate&lt;/li&gt;&#xA;&lt;li&gt;tac - concatenate in reverse&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;column-command&#34;&gt;&lt;code&gt;column&lt;/code&gt; command&lt;/h2&gt;&#xA;&lt;p&gt;The column utility formats its input into multiple columns.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;printf &amp;quot;a:b:c\n1::3\n&amp;quot; | column -t -s &#39;:&#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;table border=&#34;2&#34; cellspacing=&#34;0&#34; cellpadding=&#34;6&#34; rules=&#34;groups&#34; frame=&#34;hsides&#34;&gt;&#xA;&lt;colgroup&gt;&#xA;&lt;col  class=&#34;org-right&#34; /&gt;&#xA;&lt;col  class=&#34;org-right&#34; /&gt;&#xA;&lt;col  class=&#34;org-left&#34; /&gt;&#xA;&lt;/colgroup&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;a&lt;/td&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;b&lt;/td&gt;&#xA;&lt;td class=&#34;org-left&#34;&gt;c&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;1&lt;/td&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;3&lt;/td&gt;&#xA;&lt;td class=&#34;org-left&#34;&gt;&amp;#xa0;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;Note that this output is different from one that is printed in terminal. Strange… Below is the terminal output.&lt;/p&gt;&#xA;&lt;table border=&#34;2&#34; cellspacing=&#34;0&#34; cellpadding=&#34;6&#34; rules=&#34;groups&#34; frame=&#34;hsides&#34;&gt;&#xA;&lt;colgroup&gt;&#xA;&lt;col  class=&#34;org-right&#34; /&gt;&#xA;&lt;col  class=&#34;org-left&#34; /&gt;&#xA;&lt;col  class=&#34;org-right&#34; /&gt;&#xA;&lt;/colgroup&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;a&lt;/td&gt;&#xA;&lt;td class=&#34;org-left&#34;&gt;b&lt;/td&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;c&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;1&lt;/td&gt;&#xA;&lt;td class=&#34;org-left&#34;&gt;&amp;#xa0;&lt;/td&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;3&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;uuidgen-universal-unique-id-generator&#34;&gt;&lt;code&gt;uuidgen&lt;/code&gt; universal unique id generator&lt;/h2&gt;&#xA;&lt;p&gt;Generate unique ID&amp;rsquo;s&lt;/p&gt;&#xA;&lt;h2 id=&#34;script-records-terminal&#34;&gt;&lt;code&gt;script&lt;/code&gt; Records terminal&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;man script&#xA;man scriptreplay&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;example&#34;&gt;Example&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;script --timing=file.tm script.out&#xA;# Write some scripts&#xA;# Exit with `exit` or `^d`&#xA;scriptreplay --timing file.tm --typescript script.out&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;reset-recover-a-borked-terminal&#34;&gt;&lt;code&gt;reset&lt;/code&gt; Recover a borked terminal&lt;/h2&gt;&#xA;&lt;h2 id=&#34;count-number-of-files-in-a-directory&#34;&gt;Count number of files in a directory&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;ls -1 | wc -l&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;building-from-source&#34;&gt;Building from source&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;./configure&#xA;./configure --prefix=$path&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;redirections&#34;&gt;Redirections&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;2&amp;gt;&amp;amp;1&#xA;2&amp;gt;&amp;amp;1 &amp;gt; /dev/null&#xA;&amp;gt;&#xA;&amp;gt;/dev/null&#xA;&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;keymaps&#34;&gt;Keymaps&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;Ctrl-c&#xA;Ctrl-d&#xA;Ctrl-l&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;cp&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/cp/&#34;&gt;cp&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;cut&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/cut/&#34;&gt;cut&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;less&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/less/&#34;&gt;less&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;linux&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/linux/&#34;&gt;linux&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;seq&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/seq/&#34;&gt;seq&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;paste&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/paste/&#34;&gt;paste&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;pstree&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/posts/2023-02-17-pstree/&#34;&gt;pstree&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;du&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/du/&#34;&gt;du&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;rsync&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/rsync/&#34;&gt;rsync&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;sed&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/sed/&#34;&gt;sed&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;ssh&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/ssh/&#34;&gt;ssh&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;vifm&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/text-editors/vifm/&#34;&gt;vifm&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;zip&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/zip/&#34;&gt;zip&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;readline&#34;&gt;Readline&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;C-x C-e&lt;/code&gt; to edit current commant in default text editor&lt;/li&gt;&#xA;&lt;li&gt;or &lt;code&gt;v&lt;/code&gt; in &lt;code&gt;vi&lt;/code&gt; mode&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;ldd-print-shared-libraries&#34;&gt;&lt;code&gt;ldd&lt;/code&gt; Print shared libraries&lt;/h2&gt;&#xA;&lt;p&gt;This command can be used to find all the shared library or libraries of a program&lt;/p&gt;</description>
    </item>
    <item>
      <title>Lockfile</title>
      <link>https://raveenkumar.com/library/programming/lockfile/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/lockfile/</guid>
      <description>&lt;h2 id=&#34;lockfile&#34;&gt;&lt;code&gt;lockfile&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;installation&#34;&gt;Installation&lt;/h3&gt;&#xA;&lt;p&gt;&lt;code&gt;sudo apt install procmail&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;description&#34;&gt;Description&lt;/h3&gt;&#xA;&lt;p&gt;&lt;code&gt;man lockfile&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Suppose you want to make sure that access to the file &amp;ldquo;important&amp;rdquo; is&#xA;serialised, i.e., no more than one program or shell script should be&#xA;allowed to access it. For simplicity&amp;rsquo;s sake, let&amp;rsquo;s suppose that it is a&#xA;shell script. In this case you could solve it like this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;lockfile important.lock&#xA;...&#xA;access_&amp;quot;important&amp;quot;_to_your_hearts_content&#xA;...&#xA;rm -f important.lock&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Now if all the scripts that access &amp;ldquo;important&amp;rdquo; follow this guideline,&#xA;you will be assured that at most one script will be executing between&#xA;the &lt;code&gt;lockfile&lt;/code&gt; and the &lt;code&gt;rm&lt;/code&gt; commands.&lt;/p&gt;</description>
    </item>
    <item>
      <title>paste</title>
      <link>https://raveenkumar.com/library/programming/paste/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/paste/</guid>
      <description>&lt;h2 id=&#34;print-2-files-side-by-side&#34;&gt;print 2 files side by side&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;paste file1 file2&#xA;&#xA;-d {{delimiter}}&#xA;-d&#39;&#39;&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Programming Concepts</title>
      <link>https://raveenkumar.com/library/programming/programming-concepts/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/programming-concepts/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;Arrays&lt;/li&gt;&#xA;&lt;li&gt;Associative arrays&lt;/li&gt;&#xA;&lt;li&gt;dicts&lt;/li&gt;&#xA;&lt;li&gt;case&lt;/li&gt;&#xA;&lt;li&gt;while&lt;/li&gt;&#xA;&lt;li&gt;for&lt;/li&gt;&#xA;&lt;li&gt;if&lt;/li&gt;&#xA;&lt;li&gt;exit codes and returns&lt;/li&gt;&#xA;&lt;li&gt;advicing functions&lt;/li&gt;&#xA;&lt;li&gt;Fuzzy matching - &lt;a href=&#34;https://raveenkumar.com/posts/2023-02-26-fuzzy-matching-with-python/&#34;&gt;Fuzzy Matching with python&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Ranger file manager</title>
      <link>https://raveenkumar.com/library/programming/ranger/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/ranger/</guid>
      <description>&lt;p&gt;Managing files from commandline might be cumbersome time to&#xA;time. To make the job easy there are quit a lot of terminal curses&#xA;based file managers available like, ranger which uses Vi&#xA;keybindings.&lt;/p&gt;&#xA;&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pip install ranger-fm&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;usage&#34;&gt;usage&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;ranger&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;keybindings&#34;&gt;keybindings&lt;/h2&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://ranger.github.io/cheatsheet.png&#34; alt=&#34;img&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;official-pages&#34;&gt;Official pages&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://ranger.github.io/documentation.html&#34;&gt;https://ranger.github.io/documentation.html&lt;/a&gt;&#xA;&lt;a href=&#34;https://github.com/ranger/ranger&#34;&gt;https://github.com/ranger/ranger&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;tabbed-mode&#34;&gt;Tabbed mode&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;Ctrl-n&#xA;&amp;lt;Tab&amp;gt; key to switch between tabs&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;show-hidden-files&#34;&gt;&lt;a href=&#34;https://youtu.be/B5ISNwXwDcE&#34;&gt;Show hidden files&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;Ctrl-h&#xA;zh&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;to-cd-into-current-curectory-after-exit&#34;&gt;To cd into current curectory after exit&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://superuser.com/questions/1043806/how-to-exit-the-ranger-file-explorer-back-to-command-prompt-but-keep-the-current&#34;&gt;https://superuser.com/questions/1043806/how-to-exit-the-ranger-file-explorer-back-to-command-prompt-but-keep-the-current&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;alias ranger=&#39;ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd &amp;quot;$LASTDIR&amp;quot;&#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;open-multiple-files-in-vim-from-ranger&#34;&gt;Open Multiple files in vim from ranger&lt;/h2&gt;&#xA;&lt;p&gt;Select all the files with ranger&lt;/p&gt;</description>
    </item>
    <item>
      <title>rsync</title>
      <link>https://raveenkumar.com/library/programming/rsync/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/rsync/</guid>
      <description>&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;rsync -P source dest&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;this-is-the-command-that-i-used-for-syncing-this-website&#34;&gt;This is the command that I used for syncing this website&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;# For whatever reason rsync excludes tags directory, so --include used&#xA;rsync -av --delete --checksum --copy-links -rPuzhi ./public/ root@raveenkumar.xyz:/var/www/raveenkumar/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;example---directory-mirroring&#34;&gt;Example - Directory mirroring&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;rsync -PCahzvu --delete $ORIG_PATH/$ORIG_DIR $MIRROR_PATH/.&#xA;&#xA;-P -C: Skip revision control files&#xA;-a: Archive &#xA;-h: Human readable&#xA;-z: zip&#xA;-v: Verbose&#xA;-u: Update&#xA;--delete: Delete directories and files which  is present in mirror directory but not in original directory.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;to-exclude&#34;&gt;To exclude&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;--exclude=”\*/file.txt”&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://superuser.com/questions/555799/how-to-setup-rsync-without-password-with-ssh-on-unix-linux&#34;&gt;https://superuser.com/questions/555799/how-to-setup-rsync-without-password-with-ssh-on-unix-linux&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>seq</title>
      <link>https://raveenkumar.com/library/programming/seq/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/seq/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.compciv.org/topics/bash/variables-and-substitution/&#34;&gt;http://www.compciv.org/topics/bash/variables-and-substitution/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;seq 1 5&#xA;echo $(seq 1 5)&#xA;# Or, to create 5 new directories:&#xA;# mkdir $(seq 1 5)&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Slurm Job manager</title>
      <link>https://raveenkumar.com/library/programming/slurm---srun-job-manager/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/slurm---srun-job-manager/</guid>
      <description>&lt;p&gt;To allocate 4 CPU cores and 8 GB of RAM for an &lt;code&gt;emacs&lt;/code&gt; process using the &lt;code&gt;srun&lt;/code&gt; command, you can use the following command:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;srun --cpus-per-task=4 --mem=8192 emacs&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;--cpus-per-task&lt;/code&gt; option specifies the number of CPU cores to allocate, and the &lt;code&gt;--mem&lt;/code&gt; option specifies the amount of memory in megabytes.&lt;/p&gt;&#xA;&lt;p&gt;To pass the &lt;code&gt;-nw&lt;/code&gt; argument to &lt;code&gt;emacs&lt;/code&gt; when using the &lt;code&gt;srun&lt;/code&gt; command, you can simply include it after the &lt;code&gt;emacs&lt;/code&gt; command in the &lt;code&gt;srun&lt;/code&gt; command line. For example:&lt;/p&gt;</description>
    </item>
    <item>
      <title>ssh</title>
      <link>https://raveenkumar.com/library/programming/ssh/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/ssh/</guid>
      <description>&lt;h2 id=&#34;cd-to-a-particular-dir-after-ssh&#34;&gt;Cd to a particular dir after ssh&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;$ ssh -t ostechnix@192.168.225.52 &#39;cd /home/ostechnix/dir1 ; bash&#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;to-automatically-install-a-ssh-public-key-on-a-remote-machine&#34;&gt;To automatically install a ssh public key on a remote machine&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;ssh-copy-id -i ~/.ssh/id_rsa.pub $USER@$HOSTNAME&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;to-manually-install-a-ssh-public-key-on-a-remote-machine&#34;&gt;To manually install a ssh public key on a remote machine&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;cat ~/.ssh/id_rsa.pub; # copy the contents of the file; paste into ssh/authorized_keys file;&#xA;chmod 600 ~/.ssh/authorized_keys&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Tar</title>
      <link>https://raveenkumar.com/library/programming/tar-gunzip-gzip/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/tar-gunzip-gzip/</guid>
      <description>&lt;h2 id=&#34;untar&#34;&gt;Untar&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;tar -xvf file.tar dir_ext&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;tar&#34;&gt;tar&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;tar -cf file.tar&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;to-compress-with-gunzipgzip&#34;&gt;To compress with gunzip/gzip&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;tar -xvfz file.tar dir_ext&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1 id=&#34;gunzip--gzip&#34;&gt;Gunzip / gzip&lt;/h1&gt;&#xA;&lt;pre&gt;&lt;code&gt;cat file | gzip &amp;gt; file.gzip&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Unix find</title>
      <link>https://raveenkumar.com/library/programming/find/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/find/</guid>
      <description>&lt;h2 id=&#34;to-exclude-files-or-perform-reverse-match&#34;&gt;To exclude files or perform reverse match&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find . -not -iname &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;file&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;to-perform-regex-matching&#34;&gt;To perform regex matching&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find . -regex &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;.*file&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;to-find-and-print-only-symbolic-links-in-a-directory-and-its-subdirectories&#34;&gt;To find and print only symbolic links in a directory and its subdirectories&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;find . -type l -print&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Zip</title>
      <link>https://raveenkumar.com/library/programming/zip/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/zip/</guid>
      <description>&lt;h2 id=&#34;basic-usage&#34;&gt;Basic usage&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;zip -r my_folder.zip my_folder&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;For max compression&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;zip -9 -r my_folder.zip my_folder&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If you want to split the zip file into multiple parts of a certain size, you can use the -s option. For example, to split the zip file into 1 GB parts, you would type:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;zip -s 1g -r my_folder.zip my_folder&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This will create files named my_folder.zip, my_folder.z01, my_folder.z02, etc. To unzip them, you need to use the unzip command with the first file only 2:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bash</title>
      <link>https://raveenkumar.com/library/programming/bash/</link>
      <pubDate>Thu, 16 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/bash/</guid>
      <description>&lt;h2 id=&#34;bash&#34;&gt;Bash&lt;/h2&gt;&#xA;&lt;h2 id=&#34;reading-materials&#34;&gt;Reading materials&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://blog.yossarian.net/2020/01/23/Anybody-can-write-good-bash-with-a-little-effort&#34;&gt;https://blog.yossarian.net/2020/01/23/Anybody-can-write-good-bash-with-a-little-effort&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://will-keleher.com/posts/5-Useful-Bash-Patterns.html&#34;&gt;https://will-keleher.com/posts/5-Useful-Bash-Patterns.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://timvisee.com/blog/elegant-bash-conditionals&#34;&gt;https://timvisee.com/blog/elegant-bash-conditionals&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://srobb.net/shellscripting.html&#34;&gt;https://srobb.net/shellscripting.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://srobb.net/bashtips.html&#34;&gt;https://srobb.net/bashtips.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;select-statement&#34;&gt;Select statement&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; opt in y n; &lt;span style=&#34;color:#66d9ef&#34;&gt;do&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;echo $opt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This creates a loop where the user can select the option. Use case to break out of the loop.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; opt in y n; &lt;span style=&#34;color:#66d9ef&#34;&gt;do&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;echo $opt selected&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;case&lt;/span&gt; $opt in&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;y&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;break &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;n&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;break &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;*&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;echo wrong option&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;esac&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;bash-variables&#34;&gt;Bash variables&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;$USER&#xA;$HOSTNAME&#xA;$PS1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;to-find-or-list-all-environment-variables&#34;&gt;To Find or List all environment variables&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;env&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This is useful when we want to manage the shell variables properly&lt;/p&gt;</description>
    </item>
    <item>
      <title>GIT</title>
      <link>https://raveenkumar.com/library/programming/git/</link>
      <pubDate>Thu, 16 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/git/</guid>
      <description>&lt;h2 id=&#34;never-rebase&#34;&gt;Never rebase&lt;/h2&gt;&#xA;&lt;p&gt;Never rebase if you commit frequently. Merge is the correct option. Rebase could miss some changes.&lt;/p&gt;&#xA;&lt;h2 id=&#34;2023-01-08---grep-for-a-string-or-a-change-in-all-the-commits&#34;&gt;2023-01-08 - Grep for a string or a change in all the commits&lt;/h2&gt;&#xA;&lt;p&gt;Also called git pickaxe&#xA;This will find any string that ever existed in that repo.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git log  -S &amp;lt;string&amp;gt; -p&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;removing-large-files-and-sensitive-files-from-repo&#34;&gt;Removing large files and sensitive files from repo.&lt;/h2&gt;&#xA;&lt;p&gt;I accidentally uploaded about 1.7 GB of data into GitHub, and GitHub only accepts 100 MB max file size.&lt;/p&gt;</description>
    </item>
    <item>
      <title>GNU Make Notes</title>
      <link>https://raveenkumar.com/library/programming/gnu-make/</link>
      <pubDate>Mon, 13 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/gnu-make/</guid>
      <description>&lt;h2 id=&#34;gnu-make-notes&#34;&gt;GNU Make notes&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.cmcrossroads.com/article/basics-getting-environment-variables-gnu-make&#34;&gt;https://www.cmcrossroads.com/article/basics-getting-environment-variables-gnu-make&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;exit script with &lt;code&gt;exit 0&lt;/code&gt; or make will interpret it as error if there is no &lt;code&gt;0&lt;/code&gt; returned. Context below&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://stackoverflow.com/questions/15894675/make-error-1&#34;&gt;c - Make: *** [] Error 1 - Stack Overflow&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to shoot yourself in the foot</title>
      <link>https://raveenkumar.com/library/programming/how-to-shoot-yourself-in-the-foot/</link>
      <pubDate>Tue, 07 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/how-to-shoot-yourself-in-the-foot/</guid>
      <description>&lt;h2 id=&#34;how-to-shoot-yourself-in-the-foot&#34;&gt;How to shoot yourself in the foot&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Described below are several methods for shooting yourself in the foot using various programming techniques.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;C&lt;/strong&gt;&lt;br&gt;&#xA;You shoot yourself in the foot.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;C++&lt;/strong&gt;&lt;br&gt;&#xA;You accidentally create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical care is impossible since you can&amp;rsquo;t tell which are bitwise copies and which are just pointing at others and saying, &amp;ldquo;That&amp;rsquo;s me over there.&amp;rdquo;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hugo Notes</title>
      <link>https://raveenkumar.com/library/programming/hugo_notes/</link>
      <pubDate>Wed, 01 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/hugo_notes/</guid>
      <description>&lt;h2 id=&#34;hugo-notes&#34;&gt;Hugo notes&lt;/h2&gt;&#xA;&lt;p&gt;Tryig to transition to hugo for my website. This link has been hugely helpful.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://cloudcannon.com/community/learn/hugo-beginner-tutorial/layouts-in-hugo/&#34;&gt;https://cloudcannon.com/community/learn/hugo-beginner-tutorial/layouts-in-hugo/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Note that &lt;strong&gt;Hugo does not publish posts that is on a future date and todays date&lt;/strong&gt;. It only serves / publishes those are yesterday and before.&lt;/p&gt;&#xA;&lt;h2 id=&#34;sort-and-print-all-tags-by-count&#34;&gt;Sort and print all tags by count&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://code.luasoftware.com/tutorials/hugo/hugo-list-tags-sort-by-count&#34;&gt;https://code.luasoftware.com/tutorials/hugo/hugo-list-tags-sort-by-count&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;centering-images-in-hugo&#34;&gt;Centering images in hugo&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://www.ebadf.net/2016/10/19/centering-images-in-hugo/&#34;&gt;http://www.ebadf.net/2016/10/19/centering-images-in-hugo/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;create-tags-at-the-end-of-a-blog-post&#34;&gt;Create tags at the end of a blog post&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.jakewiesler.com/blog/hugo-taxonomies&#34;&gt;https://www.jakewiesler.com/blog/hugo-taxonomies&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Some notes on using Hugo to publish websites&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mercurial</title>
      <link>https://raveenkumar.com/library/programming/mercurial-or-hg/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/mercurial-or-hg/</guid>
      <description>&lt;h2 id=&#34;log&#34;&gt;Log&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;hg log -u USERNAME &#xA;hg log &amp;lt;branch name&amp;gt; -G # -G for graph view&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;to-ignore-specific-files-hgignore&#34;&gt;To ignore specific files &lt;code&gt;.hgignore&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# .hgignore&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dumps&lt;span style=&#34;color:#ae81ff&#34;&gt;\*&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tmp&lt;span style=&#34;color:#ae81ff&#34;&gt;\*&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;branches&#34;&gt;Branches&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;hg log -b&#xA;hg branch &amp;lt;Branch name&amp;gt; # current working area as a new branch &#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;patching&#34;&gt;Patching&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;hg diff &amp;gt; local_changes.patch&#xA;hg import --no-commit local_changes.patch &#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;updating&#34;&gt;Updating&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;hg up&#xA;hg clean &#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;reverting&#34;&gt;Reverting&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;hg revert &amp;lt;file&amp;gt;&#xA;hg revert --all&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h1 id=&#34;check-all-subrepos&#34;&gt;Check all subrepos&lt;/h1&gt;&#xA;&lt;p&gt;``` bash hg st -S hg diff -S ```&lt;/p&gt;&#xA;&lt;h1 id=&#34;hg-relative-args&#34;&gt;Hg relative args&lt;/h1&gt;&#xA;&lt;p&gt;``` bash hg st –rev -2 ```&lt;/p&gt;</description>
    </item>
    <item>
      <title>Octave</title>
      <link>https://raveenkumar.com/library/programming/octave/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/octave/</guid>
      <description>&lt;h2 id=&#34;general&#34;&gt;General&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;  &lt;code&gt;;&lt;/code&gt;{.verbatim} semicolon at the end of a command supresses the&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;    output of the command&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;  &lt;code&gt;typeinfo&lt;/code&gt;{.verbatim} - check data type&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;  &lt;code&gt;close all&lt;/code&gt;{.verbatim}&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;  &lt;code&gt;clear&lt;/code&gt;{.verbatim}&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;  &lt;code&gt;clc&lt;/code&gt;{.verbatim}&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;plot&#34;&gt;Plot&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-octave&#34; data-lang=&#34;octave&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;view(azimuth, elevation)&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;view(&lt;span style=&#34;color:#ae81ff&#34;&gt;90&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;) &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; To view &lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;d plot as &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;d&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;view(&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;90&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;)&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;% Octave Legend: &amp;lt;https://octave.sourceforge.io/octave/function/legend.html&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;file-handling-operations&#34;&gt;File handling operations&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-octave&#34; data-lang=&#34;octave&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;data=load(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;file_name.mat&amp;#39;&lt;/span&gt;) &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; To load a mat file&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;save(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;-text&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;data.txt&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;data&amp;#34;&lt;/span&gt;) &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; To save a variable to a file&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;save data&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;csvwrite (filename, x) &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; Write the numeric matrix x to the file filename in comma&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;separated&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;value (CSV) format.&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;data=[struct2cell(load(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;data.mat&amp;#39;&lt;/span&gt;)){:}]; &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; convert a structure to array&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;c=exist(name); &lt;span style=&#34;color:#75715e&#34;&gt;% [check for file/var exists](https://octave.sourceforge.io/octave/function/exist.html)&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;reading-a-binary-file&#34;&gt;Reading a binary file&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-octave&#34; data-lang=&#34;octave&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;fid=fopen(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;file.bin&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;rb&amp;#34;&lt;/span&gt;);&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;data=fread(fid, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;uint64&amp;#34;&lt;/span&gt;);&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;loading-file-into-a-variable&#34;&gt;Loading file into a variable&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-octave&#34; data-lang=&#34;octave&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;data=load(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;file.mat&amp;#34;&lt;/span&gt;)&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;save-to-file-in-plain-text&#34;&gt;Save to file in plain text&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-octave&#34; data-lang=&#34;octave&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dlmwrite(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;file.txt&amp;#34;&lt;/span&gt;, data, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;,&amp;#34;&lt;/span&gt;)&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;csvwrite(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;file.csv&amp;#34;&lt;/span&gt;, data)&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;structures&#34;&gt;Structures&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-octave&#34; data-lang=&#34;octave&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;data_main.name &lt;span style=&#34;color:#75715e&#34;&gt;% will get data from the data_main structure, with object &amp;#34;name&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;string-manipulation&#34;&gt;String manipulation&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-octave&#34; data-lang=&#34;octave&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;strrep(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;String&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;i&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;); &lt;span style=&#34;color:#75715e&#34;&gt;% i will be replaced with 1; Str1ng&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;strcat(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;String1&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;String2&amp;#34;&lt;/span&gt;); &lt;span style=&#34;color:#75715e&#34;&gt;% Output = String1String2&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;str=int2str(i) &lt;span style=&#34;color:#75715e&#34;&gt;% Integer to string&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;num=str2num(j) &lt;span style=&#34;color:#75715e&#34;&gt;% String to number&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;matrix-manipulation&#34;&gt;Matrix manipulation&lt;/h2&gt;&#xA;&lt;h3 id=&#34;find-sizes&#34;&gt;Find sizes&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-octave&#34; data-lang=&#34;octave&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ndims(matrix)&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rows(matrix)&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;columns(matrix)&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;rearranging---flip&#34;&gt;Rearranging - flip&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-octave&#34; data-lang=&#34;octave&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;flipr(matrix) &lt;span style=&#34;color:#75715e&#34;&gt;% 12...9 to 98...1&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;rearranging---permute&#34;&gt;Rearranging - permute&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-octave&#34; data-lang=&#34;octave&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;%% Converting x, y and z to z, x, y&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;data.element=permute(data.element, [&lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;]);&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;size(data.rdc1);&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;sum-all-elements-of-a-matirx&#34;&gt;Sum all elements of a matirx&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-octave&#34; data-lang=&#34;octave&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sum(matrix)&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;multiply-all-elements-in-a-matrix-with-itself&#34;&gt;Multiply all elements in a matrix with itself&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-octave&#34; data-lang=&#34;octave&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;matrix&lt;span style=&#34;color:#f92672&#34;&gt;.*&lt;/span&gt;matrix&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;concatenation&#34;&gt;Concatenation&lt;/h2&gt;&#xA;&lt;h3 id=&#34;matrix&#34;&gt;Matrix&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt; hcat&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;    ``` octave&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
