From 61da36291deef0210594771b52e010f4c1075051 Mon Sep 17 00:00:00 2001 From: Umar Ahmad Date: Sat, 30 Dec 2023 22:32:49 +0530 Subject: [PATCH] Site update Sat Dec 30 17:02:49 UTC 2023 --- .DS_Store | Bin 0 -> 6148 bytes 404.html | 159 +-------- about/index.html | 201 ++--------- blog/2014/02/19/hello-blogging/index.html | 11 +- blog/2014/03/04/fixing-brightness/index.html | 11 +- .../index.html | 11 +- .../03/24/migrating-to-fedora-20/index.html | 11 +- .../index.html | 11 +- blog/2014/04/10/customizing-emacs/index.html | 11 +- .../18/from-wordpress-to-octopress/index.html | 11 +- blog/2014/05/08/gsf-hacks/index.html | 11 +- blog/2014/06/12/gsoc-here-we-go/index.html | 11 +- .../index.html | 11 +- blog/2014/07/09/drush-it/index.html | 11 +- blog/2014/09/05/gsoc-meetup-2014/index.html | 11 +- .../index.html | 11 +- .../installing-fedora-on-macbook/index.html | 11 +- .../editing-remote-code-with-emacs/index.html | 11 +- .../index.html | 161 +-------- .../index.html | 222 ++---------- blog/customizing-emacs/index.html | 175 +--------- blog/drush-it/index.html | 173 +--------- .../editing-remote-code-with-emacs/index.html | 224 ++---------- .../index.html | 187 +--------- blog/fixing-brightness/index.html | 165 +-------- blog/from-wordpress-to-octopress/index.html | 161 +-------- blog/gsf-hacks/index.html | 161 +-------- blog/gsoc-here-we-go/index.html | 161 +-------- blog/gsoc-meetup-2014/index.html | 161 +-------- .../index.html | 163 +-------- blog/hello-blogging/index.html | 161 +-------- .../index.html | 325 ++++-------------- blog/installing-fedora-on-macbook/index.html | 224 ++---------- blog/migrating-to-fedora-20/index.html | 161 +-------- blog/quick-scratch-buffers/index.html | 235 +++---------- blog/setting-up-the-blog-again/index.html | 187 +--------- .../index.html | 173 +--------- blog/using-emacs-to-port-my-blog/index.html | 293 +++------------- categories/index.html | 159 +-------- categories/index.xml | 3 +- images/php-highlight-sans-tree-sitter.png | Bin 340274 -> 162636 bytes images/php-highlight-tree-sitter.png | Bin 366510 -> 93151 bytes index.html | 159 +-------- index.xml | 127 ++----- main.min.css | 1 + tags/blog/index.html | 159 +-------- tags/blog/index.xml | 13 +- tags/emacs/index.html | 159 +-------- tags/emacs/index.xml | 31 +- tags/index.html | 159 +-------- tags/index.xml | 7 +- 51 files changed, 596 insertions(+), 4779 deletions(-) create mode 100644 .DS_Store create mode 100644 main.min.css diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..01c0fd602e0547c771f3e34e106b1bce1bdf5691 GIT binary patch literal 6148 zcmeHK%}T>S5Z-NTn^J@x6g@6@E!ZEW2QMMk7cim+m70)HgK4%jtvQrJuKGg0iO=KA z?&c5-9!2a7?0&QJvzz%K`@({)@6)Y&=5H)6@unUSIquQJ9w%XI~(PlFqj(TD+-1fv~ z+&}M$v*BpFZCi&Yrx(}Lmw2AYH_aml%9ZRJEZ`lKQc17wGKpm}1ACEE#1aw%!~iis z4D28S<}k22J6JoFObieMKQn;)gMfx;8_YGTtphr|KBK>ZhypskB@l%{+hDE{JRn@B z0_s$5o)}!GgI$<7+hDFyr!%frhI!1&#p8vm)xj=QIODcP>WKkjpv*vB54(8&U%@X^ z`N%J)(1;iy2L2fXyfJYn4ish1)^FwESu3DDK|{f~92F4IOP2r`;68G!oZ2r?hdA3{ Wt`TQJyGjS7i-018I%41#82AEfZ%fVq literal 0 HcmV?d00001 diff --git a/404.html b/404.html index 2b049a3f..54a575fc 100644 --- a/404.html +++ b/404.html @@ -18,8 +18,7 @@ - - + @@ -28,162 +27,10 @@ - + + diff --git a/about/index.html b/about/index.html index 9335dbb1..fa7bb5b2 100644 --- a/about/index.html +++ b/about/index.html @@ -7,17 +7,17 @@ About | Umar Ahmad +I spend most of my time inside Emacs. Discovering and learning something new almost every time I sit down for change in my config. Hopefully, this blog will contain some of those learnings. +Speaking of config, you can find my dotfiles and my emacs config on github +Blog This blog is built with Hugo and uses a slightly modified BearBlog theme." /> +I spend most of my time inside Emacs. Discovering and learning something new almost every time I sit down for change in my config. Hopefully, this blog will contain some of those learnings. +Speaking of config, you can find my dotfiles and my emacs config on github +Blog This blog is built with Hugo and uses a slightly modified BearBlog theme." /> @@ -26,181 +26,28 @@ - - + +I spend most of my time inside Emacs. Discovering and learning something new almost every time I sit down for change in my config. Hopefully, this blog will contain some of those learnings. +Speaking of config, you can find my dotfiles and my emacs config on github +Blog This blog is built with Hugo and uses a slightly modified BearBlog theme."/> +I spend most of my time inside Emacs. Discovering and learning something new almost every time I sit down for change in my config. Hopefully, this blog will contain some of those learnings. +Speaking of config, you can find my dotfiles and my emacs config on github +Blog This blog is built with Hugo and uses a slightly modified BearBlog theme."> - + + @@ -248,18 +95,10 @@

@@ -287,7 +126,7 @@

repo="gleek/gleek.github.io" issue-term="pathname" label="comment" - theme="github-dark" + theme="github-light" crossorigin="anonymous" async> diff --git a/blog/2014/02/19/hello-blogging/index.html b/blog/2014/02/19/hello-blogging/index.html index 30ce6952..1b92eab0 100644 --- a/blog/2014/02/19/hello-blogging/index.html +++ b/blog/2014/02/19/hello-blogging/index.html @@ -1 +1,10 @@ -https://umarahmad.xyz/blog/hello-blogging/ \ No newline at end of file + + + + https://umarahmad.xyz/blog/hello-blogging/ + + + + + + diff --git a/blog/2014/03/04/fixing-brightness/index.html b/blog/2014/03/04/fixing-brightness/index.html index 7560d00a..45be9b98 100644 --- a/blog/2014/03/04/fixing-brightness/index.html +++ b/blog/2014/03/04/fixing-brightness/index.html @@ -1 +1,10 @@ -https://umarahmad.xyz/blog/fixing-brightness/ \ No newline at end of file + + + + https://umarahmad.xyz/blog/fixing-brightness/ + + + + + + diff --git a/blog/2014/03/24/adding-drupal-irc-bot-to-number-jmilug/index.html b/blog/2014/03/24/adding-drupal-irc-bot-to-number-jmilug/index.html index 3789d6dd..da244a4e 100644 --- a/blog/2014/03/24/adding-drupal-irc-bot-to-number-jmilug/index.html +++ b/blog/2014/03/24/adding-drupal-irc-bot-to-number-jmilug/index.html @@ -1 +1,10 @@ -https://umarahmad.xyz/blog/adding-drupal-irc-bot-to-number-jmilug/ \ No newline at end of file + + + + https://umarahmad.xyz/blog/adding-drupal-irc-bot-to-number-jmilug/ + + + + + + diff --git a/blog/2014/03/24/migrating-to-fedora-20/index.html b/blog/2014/03/24/migrating-to-fedora-20/index.html index 4a41c8e4..54289630 100644 --- a/blog/2014/03/24/migrating-to-fedora-20/index.html +++ b/blog/2014/03/24/migrating-to-fedora-20/index.html @@ -1 +1,10 @@ -https://umarahmad.xyz/blog/migrating-to-fedora-20/ \ No newline at end of file + + + + https://umarahmad.xyz/blog/migrating-to-fedora-20/ + + + + + + diff --git a/blog/2014/03/26/automatically-changing-desktop-background-on-gnome-shell/index.html b/blog/2014/03/26/automatically-changing-desktop-background-on-gnome-shell/index.html index ca98b5e2..7419136f 100644 --- a/blog/2014/03/26/automatically-changing-desktop-background-on-gnome-shell/index.html +++ b/blog/2014/03/26/automatically-changing-desktop-background-on-gnome-shell/index.html @@ -1 +1,10 @@ -https://umarahmad.xyz/blog/automatically-changing-desktop-background-on-gnome-shell/ \ No newline at end of file + + + + https://umarahmad.xyz/blog/automatically-changing-desktop-background-on-gnome-shell/ + + + + + + diff --git a/blog/2014/04/10/customizing-emacs/index.html b/blog/2014/04/10/customizing-emacs/index.html index b06509b9..88608759 100644 --- a/blog/2014/04/10/customizing-emacs/index.html +++ b/blog/2014/04/10/customizing-emacs/index.html @@ -1 +1,10 @@ -https://umarahmad.xyz/blog/customizing-emacs/ \ No newline at end of file + + + + https://umarahmad.xyz/blog/customizing-emacs/ + + + + + + diff --git a/blog/2014/04/18/from-wordpress-to-octopress/index.html b/blog/2014/04/18/from-wordpress-to-octopress/index.html index b7cf5b3e..b817a370 100644 --- a/blog/2014/04/18/from-wordpress-to-octopress/index.html +++ b/blog/2014/04/18/from-wordpress-to-octopress/index.html @@ -1 +1,10 @@ -https://umarahmad.xyz/blog/from-wordpress-to-octopress/ \ No newline at end of file + + + + https://umarahmad.xyz/blog/from-wordpress-to-octopress/ + + + + + + diff --git a/blog/2014/05/08/gsf-hacks/index.html b/blog/2014/05/08/gsf-hacks/index.html index 51adbb2a..384e5a2a 100644 --- a/blog/2014/05/08/gsf-hacks/index.html +++ b/blog/2014/05/08/gsf-hacks/index.html @@ -1 +1,10 @@ -https://umarahmad.xyz/blog/gsf-hacks/ \ No newline at end of file + + + + https://umarahmad.xyz/blog/gsf-hacks/ + + + + + + diff --git a/blog/2014/06/12/gsoc-here-we-go/index.html b/blog/2014/06/12/gsoc-here-we-go/index.html index 277080ad..5d7c1e98 100644 --- a/blog/2014/06/12/gsoc-here-we-go/index.html +++ b/blog/2014/06/12/gsoc-here-we-go/index.html @@ -1 +1,10 @@ -https://umarahmad.xyz/blog/gsoc-here-we-go/ \ No newline at end of file + + + + https://umarahmad.xyz/blog/gsoc-here-we-go/ + + + + + + diff --git a/blog/2014/06/29/gsoc-midterms-half-over-is-half-left/index.html b/blog/2014/06/29/gsoc-midterms-half-over-is-half-left/index.html index 8f2ed725..55326532 100644 --- a/blog/2014/06/29/gsoc-midterms-half-over-is-half-left/index.html +++ b/blog/2014/06/29/gsoc-midterms-half-over-is-half-left/index.html @@ -1 +1,10 @@ -https://umarahmad.xyz/blog/gsoc-midterms-half-over-is-half-left/ \ No newline at end of file + + + + https://umarahmad.xyz/blog/gsoc-midterms-half-over-is-half-left/ + + + + + + diff --git a/blog/2014/07/09/drush-it/index.html b/blog/2014/07/09/drush-it/index.html index dc07075d..2eb95e1b 100644 --- a/blog/2014/07/09/drush-it/index.html +++ b/blog/2014/07/09/drush-it/index.html @@ -1 +1,10 @@ -https://umarahmad.xyz/blog/drush-it/ \ No newline at end of file + + + + https://umarahmad.xyz/blog/drush-it/ + + + + + + diff --git a/blog/2014/09/05/gsoc-meetup-2014/index.html b/blog/2014/09/05/gsoc-meetup-2014/index.html index 62e8b7a0..8d571d95 100644 --- a/blog/2014/09/05/gsoc-meetup-2014/index.html +++ b/blog/2014/09/05/gsoc-meetup-2014/index.html @@ -1 +1,10 @@ -https://umarahmad.xyz/blog/gsoc-meetup-2014/ \ No newline at end of file + + + + https://umarahmad.xyz/blog/gsoc-meetup-2014/ + + + + + + diff --git a/blog/2014/09/27/things-to-do-after-installing-fedora/index.html b/blog/2014/09/27/things-to-do-after-installing-fedora/index.html index 291461e3..ad622df9 100644 --- a/blog/2014/09/27/things-to-do-after-installing-fedora/index.html +++ b/blog/2014/09/27/things-to-do-after-installing-fedora/index.html @@ -1 +1,10 @@ -https://umarahmad.xyz/blog/things-to-do-after-installing-fedora/ \ No newline at end of file + + + + https://umarahmad.xyz/blog/things-to-do-after-installing-fedora/ + + + + + + diff --git a/blog/2017/04/09/installing-fedora-on-macbook/index.html b/blog/2017/04/09/installing-fedora-on-macbook/index.html index b48b4df4..859e85f7 100644 --- a/blog/2017/04/09/installing-fedora-on-macbook/index.html +++ b/blog/2017/04/09/installing-fedora-on-macbook/index.html @@ -1 +1,10 @@ -https://umarahmad.xyz/blog/installing-fedora-on-macbook/ \ No newline at end of file + + + + https://umarahmad.xyz/blog/installing-fedora-on-macbook/ + + + + + + diff --git a/blog/2017/04/11/editing-remote-code-with-emacs/index.html b/blog/2017/04/11/editing-remote-code-with-emacs/index.html index 717b0ced..a485d927 100644 --- a/blog/2017/04/11/editing-remote-code-with-emacs/index.html +++ b/blog/2017/04/11/editing-remote-code-with-emacs/index.html @@ -1 +1,10 @@ -https://umarahmad.xyz/blog/editing-remote-code-with-emacs/ \ No newline at end of file + + + + https://umarahmad.xyz/blog/editing-remote-code-with-emacs/ + + + + + + diff --git a/blog/adding-drupal-irc-bot-to-number-jmilug/index.html b/blog/adding-drupal-irc-bot-to-number-jmilug/index.html index a7224b06..f2ebfba2 100644 --- a/blog/adding-drupal-irc-bot-to-number-jmilug/index.html +++ b/blog/adding-drupal-irc-bot-to-number-jmilug/index.html @@ -20,8 +20,7 @@ - - + @@ -33,162 +32,10 @@ - + + @@ -232,7 +79,7 @@

Installing

repo="gleek/gleek.github.io" issue-term="pathname" label="comment" - theme="github-dark" + theme="github-light" crossorigin="anonymous" async> diff --git a/blog/automatically-changing-desktop-background-on-gnome-shell/index.html b/blog/automatically-changing-desktop-background-on-gnome-shell/index.html index 8a88fc97..b3ba4b96 100644 --- a/blog/automatically-changing-desktop-background-on-gnome-shell/index.html +++ b/blog/automatically-changing-desktop-background-on-gnome-shell/index.html @@ -20,8 +20,7 @@ - - + @@ -29,166 +28,14 @@ - + - + + @@ -217,36 +64,35 @@

Automatically Changing desktop background on gnome-shell

This is the problem I had. I cancelled out each wallpaper from my list of all wallpapers I had, after I completely sucked out the goodness of a wallpaper with my eyes.

I came up with the idea of automatically changing the wallpaper randomly via some sort of shell script. It’s implementation used gsettings to change the desktop wallpaper. It was supposed to run automatically as a cron-job but I couldn’t make the cron work. The current implementation uses sleep to get the delay

So a simple wall paper changing script looked like:

-

-#!/bin/bash
-image_path=$1
-# Setting up a path for local storage
-
-if [ ! -d "$image_path" ]; then
-  echo "Path doesn't exist (Pass absolute path as parameter)" 1>&2
-  exit
-fi
-local_dir="/home/$(whoami)/.local/wall_change"
-# creating local directory
-mkdir -p $local_dir
-# getting name of the picture
-pic=$(find $image_path -regextype posix-extended -regex "(.*\.jpg)|(.*\.png)"|shuf -n1)
-echo $pic
-
-# Storing image in local_dir
-filename=$(basename "$pic")
-extension=".${filename##*.}"
-local_wallpaper=$local_dir/mywallpaper$extension
-# setting the wallpaper
-cp "$pic" $local_wallpaper
-# echo $local_wallpaper
-# Adding bogus wallpaper (don't know if this is a gsettings bug or i'm doing some basic flaw)
-gsettings set org.gnome.desktop.background picture-uri file:/$local_wallpaper
-# try increasing the sleep if wallpaper doesn't change
-sleep 1;
-gsettings set org.gnome.desktop.background picture-uri file://$local_wallpaper
-
-

You can find the rest of the files on Github

+

+#!/bin/bash
+image_path=$1
+# Setting up a path for local storage
+
+if [ ! -d "$image_path" ]; then
+  echo "Path doesn't exist (Pass absolute path as parameter)" 1>&2
+  exit
+fi
+local_dir="/home/$(whoami)/.local/wall_change"
+# creating local directory
+mkdir -p $local_dir
+# getting name of the picture
+pic=$(find $image_path -regextype posix-extended -regex "(.*\.jpg)|(.*\.png)"|shuf -n1)
+echo $pic
+
+# Storing image in local_dir
+filename=$(basename "$pic")
+extension=".${filename##*.}"
+local_wallpaper=$local_dir/mywallpaper$extension
+# setting the wallpaper
+cp "$pic" $local_wallpaper
+# echo $local_wallpaper
+# Adding bogus wallpaper (don't know if this is a gsettings bug or i'm doing some basic flaw)
+gsettings set org.gnome.desktop.background picture-uri file:/$local_wallpaper
+# try increasing the sleep if wallpaper doesn't change
+sleep 1;
+gsettings set org.gnome.desktop.background picture-uri file://$local_wallpaper
+

You can find the rest of the files on Github

Have fun with your wallpapers :wink:

@@ -256,7 +102,7 @@

Automatically Changing desktop background on gnome-shell

repo="gleek/gleek.github.io" issue-term="pathname" label="comment" - theme="github-dark" + theme="github-light" crossorigin="anonymous" async> diff --git a/blog/customizing-emacs/index.html b/blog/customizing-emacs/index.html index 46c64453..20927fec 100644 --- a/blog/customizing-emacs/index.html +++ b/blog/customizing-emacs/index.html @@ -20,8 +20,7 @@ - - + @@ -29,166 +28,14 @@ - + - + + @@ -224,12 +71,12 @@

Things to do after installation

  • Choosing the right font: This is more of a personal choice actually. Any monospace font would do the job. You can refer to Dan’s article or Jeff’s Blog for more details.
  • Making your scroll smooth: Emacs Scroll will seem a bit weird to some people who are new to it. To remove the jumpy effect of scroll you can add following lines in your .emacs file
  • -
    (setq redisplay-dont-pause t
    -  scroll-margin 1
    -  scroll-step 1
    -  scroll-conservatively 10000
    -  scroll-preserve-screen-position 1)
    -

    Well these are some basic customization which should be done by everyone using Emacs. You can add more features to Emacs by simply searching the package archive.

    +
    (setq redisplay-dont-pause t
    +  scroll-margin 1
    +  scroll-step 1
    +  scroll-conservatively 10000
    +  scroll-preserve-screen-position 1)
    +

    Well these are some basic customization which should be done by everyone using Emacs. You can add more features to Emacs by simply searching the package archive.

    If you’re a confused with the basic key-bindings for navigation, you may refer to the Emacs Wiki page.

    Finally, once you really get the hang of Emacs, it’s basically like dark magic. Check out some videos on the Emacs rocks page to see this magic in action.

    If you’re addicted to vi there’s a funny song on GNU’s website : ‘Addicted to vi’ :stuck_out_tongue:

    @@ -243,7 +90,7 @@

    Things to do after installation

    repo="gleek/gleek.github.io" issue-term="pathname" label="comment" - theme="github-dark" + theme="github-light" crossorigin="anonymous" async> diff --git a/blog/drush-it/index.html b/blog/drush-it/index.html index 3477f602..1b742af1 100644 --- a/blog/drush-it/index.html +++ b/blog/drush-it/index.html @@ -20,8 +20,7 @@ - - + @@ -33,162 +32,10 @@ - + + @@ -225,12 +72,12 @@

    Using Aliases and Autocompletion

    Aliases greatly improve the productivity by assigning short names to complex commands and for commands you use a lot and need a shorter version of them. This can be done by using alias builtin. The aliases are normally created inside .bashrc or .bash_profile. Some of the aliases I use are:

    -
    alias dr='drush'
    -alias drcc='drush cache-clear all'
    -alias drdb='drush updb && drush cc all'
    -alias dren='drush pm-enable'
    -alias drdis='drush pm-disable'
    -

    You may add other aliases depending on the other commands you frequently use.

    +
    alias dr='drush'
    +alias drcc='drush cache-clear all'
    +alias drdb='drush updb && drush cc all'
    +alias dren='drush pm-enable'
    +alias drdis='drush pm-disable'
    +

    You may add other aliases depending on the other commands you frequently use.

    The Autocompletion is also another great option bash. This option requires you to only partially enter the commands and pressing TAB to complete it.

    There is already a script for autocompletion on a drupal issue page which simply needs to be added in your /etc/bash_completion.d/ directory.

    You might find this textbook for bash completions helpful if you want a farther insight.

    @@ -264,7 +111,7 @@

    Porting Databases

    repo="gleek/gleek.github.io" issue-term="pathname" label="comment" - theme="github-dark" + theme="github-light" crossorigin="anonymous" async> diff --git a/blog/editing-remote-code-with-emacs/index.html b/blog/editing-remote-code-with-emacs/index.html index ee23360b..0e1cc473 100644 --- a/blog/editing-remote-code-with-emacs/index.html +++ b/blog/editing-remote-code-with-emacs/index.html @@ -20,8 +20,7 @@ - - + @@ -33,162 +32,10 @@ - + + @@ -229,13 +76,12 @@

    Option II: Using Tramp

    the problems with tramp started to appear.

    Tramp was a bit sluggish when opening and saving files. There were some optimizations that could be done with tramp settings

    -
    (setq tramp-auto-save-directory "~/tmp/tramp/")
    -(setq tramp-chunksize 2000)
    -

    and some ssh settings.

    +
    (setq tramp-auto-save-directory "~/tmp/tramp/")
    +(setq tramp-chunksize 2000)
    +

    and some ssh settings.

    Host *
           ControlMaster auto
           ControlPath ~/tmp/.ssh-control-%r-%h-%p
    -
     

    Even though, these did improve the performance by a large factor, it’s performance on large files and slow network connections, was still a little below usable.

    Apart from this, I had problems running a few Emacs packages such as flycheck.

    @@ -243,8 +89,8 @@

    Option III: Mounting Rem

    One of the options I found was mounting a remote file system locally via sshfs. It did have a few problems with connection stability, but it worked fine overall.

    I solved a few problems with some optimizations via command-line parameters. The final command looked somewhat like this.

    -
    sshfs remotehost:/remote/directory/ ~/local/directory -oauto_cache,reconnect,Ciphers=arcfour,Compression=no
    -

    This increased the overall speed and removed sluggishness while editing.

    +
    sshfs remotehost:/remote/directory/ ~/local/directory -oauto_cache,reconnect,Ciphers=arcfour,Compression=no
    +

    This increased the overall speed and removed sluggishness while editing.

    The problem with sshfs is it’s speed. Any operation requiring a disk scan was unbearably slow. So I couldn’t run commands like locate, grep, and magit via Emacs.

    Projectile was usable after (setq projectile-enable-caching t) though.

    @@ -252,18 +98,18 @@

    Option III: Mounting Rem It works by executing all commands which ran inside a directory mounted on sshfs on the remote host directly. So, heavy disk operations become very fast as the remote server is doing all the heavy lifting.

    To run any command such as git directly on remote all I had to do was

    -
    wget https://github.com/ericpruitt/sshfsexec/archive/master.zip
    -unzip master.zip
    -mv sshfsexec-master sshfsexec
    -cd sshfsexec
    -mkdir -p ~/bin/sshfsexec
    -cp sshfsexec.py ~/bin/sshfsexec
    -chmod +x ~/bin/sshfsexec/sshfsexec.py
    -export PATH="$HOME/bin/sshfsexec:$PATH"
    -cd ~/bin/sshfsexec
    -ln -s sshfsexec.py git
    -hash -r
    -

    You can check this by running git --version from inside and outside the sshfs mount.

    +
    wget https://github.com/ericpruitt/sshfsexec/archive/master.zip
    +unzip master.zip
    +mv sshfsexec-master sshfsexec
    +cd sshfsexec
    +mkdir -p ~/bin/sshfsexec
    +cp sshfsexec.py ~/bin/sshfsexec
    +chmod +x ~/bin/sshfsexec/sshfsexec.py
    +export PATH="$HOME/bin/sshfsexec:$PATH"
    +cd ~/bin/sshfsexec
    +ln -s sshfsexec.py git
    +hash -r
    +

    You can check this by running git --version from inside and outside the sshfs mount.

    The combination of sshfs and sshfsexec solved almost all the problems I faced with earlier setups. It was almost always faster than tramp when opening and saving of files, and almost as fast as tramp when doing disk operations such as opening Magit.

    @@ -282,16 +128,16 @@

    Option IV: Keeping local copy in s

    On looking a bit further, I came across Unison. It supported two way syncing along with file watch facility. It is required that same version Unison is installed on both local and remote machines. Following are the steps that will setup Unison.

    -
    sudo dnf install ocaml ocaml-camlp4-devel
    -sudo dnf install ftp://195.220.108.108/linux/fedora-secondary/releases/24/Everything/ppc64le/os/Packages/p/python-inotify-0.9.6-4.fc24.noarch.rpm
    -wget https://github.com/bcpierce00/unison/archive/2.48.4.tar.gz
    -tar -zxvf 2.48.4.tar.gz
    -cd unison-2.48.4
    -make NATIVE=true UISTYLE=text
    -sudo cp src/unison-fsmonitor /usr/local/bin
    -sudo cp src/unison /usr/local/bin
    -hash -r
    -

    Repeat these same steps on the server. +

    sudo dnf install ocaml ocaml-camlp4-devel
    +sudo dnf install ftp://195.220.108.108/linux/fedora-secondary/releases/24/Everything/ppc64le/os/Packages/p/python-inotify-0.9.6-4.fc24.noarch.rpm
    +wget https://github.com/bcpierce00/unison/archive/2.48.4.tar.gz
    +tar -zxvf 2.48.4.tar.gz
    +cd unison-2.48.4
    +make NATIVE=true UISTYLE=text
    +sudo cp src/unison-fsmonitor /usr/local/bin
    +sudo cp src/unison /usr/local/bin
    +hash -r
    +

    Repeat these same steps on the server. It is preferable to remove .git folder from syncing. This can be done by creating/editing a ~/.unison/default.prf and adding

    # Unison preferences file
    @@ -299,11 +145,11 @@ 

    Option IV: Keeping local copy in s

    You should also remove other build/libraries directories that you won’t be editing. This will decrease the amount of files it has (and memory it takes in the process) to look for changes.

    You can now start the sync by

    -
    unison default ~/local/copy ssh://server//remote/copy/path/ -repeat watch -times  -logfile /tmp/unison.log
    -

    This will keep on looking for changes in the local copy and sync the remote every time there’s one.

    +
    unison default ~/local/copy ssh://server//remote/copy/path/ -repeat watch -times  -logfile /tmp/unison.log
    +

    This will keep on looking for changes in the local copy and sync the remote every time there’s one.

    In the case when a sync is required from the remote to local

    -
    unison -batch -times ~/local/copy ssh://server//remote/copy/path/ -logfile /tmp/unison.log
    -

    can be used.

    +
    unison -batch -times ~/local/copy ssh://server//remote/copy/path/ -logfile /tmp/unison.log
    +

    can be used.

    In case of errors such as Errno=No space left on device (ENOSPC), the inotify memory can be increased by setting sudo sysctl fs.inotify.max_user_watches=20480. This memory uses [kernel memory space](https://en.wikibooks.org/wiki/The_Linux_Kernel/Memory# Process_Memory_Layout) @@ -327,7 +173,7 @@

    Concluding

    repo="gleek/gleek.github.io" issue-term="pathname" label="comment" - theme="github-dark" + theme="github-light" crossorigin="anonymous" async> diff --git a/blog/faster-php-mode-with-tree-sitter/index.html b/blog/faster-php-mode-with-tree-sitter/index.html index bbda62cb..2da89f0d 100644 --- a/blog/faster-php-mode-with-tree-sitter/index.html +++ b/blog/faster-php-mode-with-tree-sitter/index.html @@ -20,8 +20,7 @@ - - + @@ -33,162 +32,10 @@ - + + @@ -226,27 +73,27 @@

    Faster php syntax highlighting with tree-sitter

    This is what I ended up doing to achieve that:

    -
    (advice-add 'php-syntax-propertize-function :override #'return-false)
    -(advice-add 'php-syntax-propertize-extend-region :override #'return-false)
    -(remove-hook 'syntax-propertize-extend-region-functions #'php-syntax-propertize-extend-region)
    +
    (advice-add 'php-syntax-propertize-function :override #'return-false)
    +(advice-add 'php-syntax-propertize-extend-region :override #'return-false)
    +(remove-hook 'syntax-propertize-extend-region-functions #'php-syntax-propertize-extend-region)

    Here the return-false is a small utility function and is defined as follows:

    -
    (defun return-false(&rest _)
    -  "Return nil no matter what the inputs here.
    -Useful to override functions to become empty"
    -  nil)
    +
    (defun return-false(&rest _)
    +  "Return nil no matter what the inputs here.
    +Useful to override functions to become empty"
    +  nil)

    The tree sitter configuration is as follows

    -
    (use-package tree-sitter
    -  :ensure tree-sitter
    -  :ensure tree-sitter-langs
    -  :defer 2
    -  :config
    -  (add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))
    +
    (use-package tree-sitter
    +  :ensure tree-sitter
    +  :ensure tree-sitter-langs
    +  :defer 2
    +  :config
    +  (add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))

    For the sake of comparison my typing latency reduced from 600ms-2500ms to 35-50ms. This is closer to @@ -282,7 +129,7 @@

    Faster php syntax highlighting with tree-sitter

    repo="gleek/gleek.github.io" issue-term="pathname" label="comment" - theme="github-dark" + theme="github-light" crossorigin="anonymous" async> diff --git a/blog/fixing-brightness/index.html b/blog/fixing-brightness/index.html index 948a74a4..ae49fded 100644 --- a/blog/fixing-brightness/index.html +++ b/blog/fixing-brightness/index.html @@ -20,8 +20,7 @@ - - + @@ -33,162 +32,10 @@ - + + @@ -226,8 +73,8 @@

    Method I : Editing the brightness

    and changing them with root access changes the brightness. The problem here was that I wasn’t able to give a script root access without it prompting for a password. I moved the other way since I couldn’t figure that out.

    Recently, I figured out the way to give the scripts root access by editing /etc/sudoers/ file and adding

    -
    $user ALL=(ALL) NOPASSWD: $path_to_script
    -

    where $user is the user-name and $path_to_script is what it says it is!

    +
    $user ALL=(ALL) NOPASSWD: $path_to_script
    +

    where $user is the user-name and $path_to_script is what it says it is!

    Method II: Making a Python Script

    After some researching I found out about the dbus module of python, which basically could help me get or set the brightness. Using this and a little argument parsing I was successfully able to make a script which changed the brightness. Update: This method doesn’t work on Gnome-Shell v3.10 :worried: . I will update a patch soon.

    @@ -256,7 +103,7 @@

    Adding Scripts at start-up

    repo="gleek/gleek.github.io" issue-term="pathname" label="comment" - theme="github-dark" + theme="github-light" crossorigin="anonymous" async> diff --git a/blog/from-wordpress-to-octopress/index.html b/blog/from-wordpress-to-octopress/index.html index 95afa547..3da42efc 100644 --- a/blog/from-wordpress-to-octopress/index.html +++ b/blog/from-wordpress-to-octopress/index.html @@ -20,8 +20,7 @@ - - + @@ -33,162 +32,10 @@ - + + @@ -253,7 +100,7 @@

    Summary

    repo="gleek/gleek.github.io" issue-term="pathname" label="comment" - theme="github-dark" + theme="github-light" crossorigin="anonymous" async> diff --git a/blog/gsf-hacks/index.html b/blog/gsf-hacks/index.html index c65c5501..e2b4edaf 100644 --- a/blog/gsf-hacks/index.html +++ b/blog/gsf-hacks/index.html @@ -20,8 +20,7 @@ - - + @@ -33,162 +32,10 @@ - + + @@ -239,7 +86,7 @@

    GSF Hacks

    repo="gleek/gleek.github.io" issue-term="pathname" label="comment" - theme="github-dark" + theme="github-light" crossorigin="anonymous" async> diff --git a/blog/gsoc-here-we-go/index.html b/blog/gsoc-here-we-go/index.html index 8a90b247..8fa07b87 100644 --- a/blog/gsoc-here-we-go/index.html +++ b/blog/gsoc-here-we-go/index.html @@ -20,8 +20,7 @@ - - + @@ -33,162 +32,10 @@ - + + @@ -236,7 +83,7 @@ repo="gleek/gleek.github.io" issue-term="pathname" label="comment" - theme="github-dark" + theme="github-light" crossorigin="anonymous" async> diff --git a/blog/gsoc-meetup-2014/index.html b/blog/gsoc-meetup-2014/index.html index 2f6c50c3..51da2241 100644 --- a/blog/gsoc-meetup-2014/index.html +++ b/blog/gsoc-meetup-2014/index.html @@ -20,8 +20,7 @@ - - + @@ -33,162 +32,10 @@ - + + @@ -254,7 +101,7 @@ repo="gleek/gleek.github.io" issue-term="pathname" label="comment" - theme="github-dark" + theme="github-light" crossorigin="anonymous" async> diff --git a/blog/gsoc-midterms-half-over-is-half-left/index.html b/blog/gsoc-midterms-half-over-is-half-left/index.html index ef47f464..5fce9a6f 100644 --- a/blog/gsoc-midterms-half-over-is-half-left/index.html +++ b/blog/gsoc-midterms-half-over-is-half-left/index.html @@ -20,8 +20,7 @@ - - + @@ -33,162 +32,10 @@ - + + @@ -231,7 +78,7 @@

    How’s everything else?

    Other than that I’ve started to track my time using hamster which tells me that I spend more time researching than actual coding. It also tells me that T.V. is a real time killer :grimacing:. (P.S. I don’t track the sleeping hours…the long ones)

    time overview

    -

    Other than that I might have misconfigured my mind’s clock cycle. I am usually sleeping when the ‘normal’ humans work and work when they sleep.. and it’s really hard to get rid of this schedule.

    +

    Other than that I might have misconfigured my mind’s clock cycle. I am usually sleeping when the ’normal’ humans work and work when they sleep.. and it’s really hard to get rid of this schedule.

    I wish to write more but hamster tells me that I’ve spend far more time on this than originally anticipated. So I’m gonna switch back to coding and hope everything works out in the end.

    @@ -241,7 +88,7 @@

    How’s everything else?

    repo="gleek/gleek.github.io" issue-term="pathname" label="comment" - theme="github-dark" + theme="github-light" crossorigin="anonymous" async> diff --git a/blog/hello-blogging/index.html b/blog/hello-blogging/index.html index d8cebe04..f5fb5f61 100644 --- a/blog/hello-blogging/index.html +++ b/blog/hello-blogging/index.html @@ -20,8 +20,7 @@ - - + @@ -33,162 +32,10 @@ - + + @@ -231,7 +78,7 @@

    But why exactly ?

    repo="gleek/gleek.github.io" issue-term="pathname" label="comment" - theme="github-dark" + theme="github-light" crossorigin="anonymous" async> diff --git a/blog/improved-ranking-for-projectile-find-file/index.html b/blog/improved-ranking-for-projectile-find-file/index.html index 1470d4f2..da058b3c 100644 --- a/blog/improved-ranking-for-projectile-find-file/index.html +++ b/blog/improved-ranking-for-projectile-find-file/index.html @@ -7,13 +7,13 @@ Improve ranking of files in projectile | Umar Ahmad +Despite my fondness for this package, a thing that has bothered me is the default sorting of the files while searching. As the project becomes larger and the files become sparse, some extra typing needs to be done to filter down to the intended file." /> +Despite my fondness for this package, a thing that has bothered me is the default sorting of the files while searching. As the project becomes larger and the files become sparse, some extra typing needs to be done to filter down to the intended file." /> @@ -22,177 +22,24 @@ - - + +Despite my fondness for this package, a thing that has bothered me is the default sorting of the files while searching. As the project becomes larger and the files become sparse, some extra typing needs to be done to filter down to the intended file."/> +Despite my fondness for this package, a thing that has bothered me is the default sorting of the files while searching. As the project becomes larger and the files become sparse, some extra typing needs to be done to filter down to the intended file."> - + + @@ -322,20 +169,14 @@

    These factors are such that they are not affected by the search term but can be derived from the file.

      -
    • -

      Buffer files: If a file in the project is currently open there’s a +

    • Buffer files: If a file in the project is currently open there’s a high chance that I’m searching for this file. The older the buffer -gets the less score boost it should get.

      -
    • -
    • -

      Recent files: If a file in a project has been recently visited that -should contribute to increasing it’s score.

      -
    • -
    • -

      Length of file path: Considering a file with a longer path can +gets the less score boost it should get.

    • +
    • Recent files: If a file in a project has been recently visited that +should contribute to increasing it’s score.
    • +
    • Length of file path: Considering a file with a longer path can afford more characters to get filtered, a file with shorter path -should get a better score.

      -
    • +should get a better score.
    @@ -346,24 +187,16 @@

    The scores due to these factors vary with the search term

      -
    • -

      File non-directory name match: If the non-directory name of the file +

    • File non-directory name match: If the non-directory name of the file exactly matches the search term then it gets a score -boost. Eg. file.ext in path/of/file.ext

      -
    • -
    • -

      File basename match: If the basename of the file exactly matches the -search term then it gets a score boost. Eg. file in path/of/file.ext

      -
    • -
    • -

      File prefix match: If the prefix of the file basename matches with the -search term then the score is increased. Eg. fi in path/of/file.ext

      -
    • -
    • -

      File name loose match: If the file name loosely matches the search +boost. Eg. file.ext in path/of/file.ext

    • +
    • File basename match: If the basename of the file exactly matches the +search term then it gets a score boost. Eg. file in path/of/file.ext
    • +
    • File prefix match: If the prefix of the file basename matches with the +search term then the score is increased. Eg. fi in path/of/file.ext
    • +
    • File name loose match: If the file name loosely matches the search term then give it a higher score than when only directory name -matches. Eg. ile in path/of/file.ext.

      -
    • +matches. Eg. ile in path/of/file.ext.

    As you might have guessed, these are ordered here in decreasing order @@ -386,14 +219,14 @@

    This is the project tree that is used

    -
    .
    -├── a-somedirectory
    -│   ├── afile-suffix.txt
    -│   └── suffix.txt
    -├── suffix-directory
    -│   └── unrelated-file.txt
    -├── suffix-postfix.txt
    -└── suffix.txt
    +
    .
    +├── a-somedirectory
    +│   ├── afile-suffix.txt
    +│   └── suffix.txt
    +├── suffix-directory
    +│   └── unrelated-file.txt
    +├── suffix-postfix.txt
    +└── suffix.txt

    We’ll be searching for "suffix", and analyzing the results for each framework.

    @@ -403,18 +236,14 @@

      -
    • -

      Default sorting seems alphabetic

      -
    • -
    • -

      Retains sorting when searching

      -

      - +

    • Default sorting seems alphabetic
    • +
    • Retains sorting when searching -

      Click here to download or view the video in a full browser window

      -

      + + +

      Click here to download or view the video in a full browser window

    @@ -425,18 +254,14 @@

      -
    • -

      No apparent default sorting

      -
    • -
    • -

      File basenames exactly matching the search term are not pushed up.

      -

      - +

    • No apparent default sorting
    • +
    • File basenames exactly matching the search term are not pushed up. -

      Click here to download or view the video in a full browser window

      -

      + + +

      Click here to download or view the video in a full browser window

    @@ -447,23 +272,17 @@

      -
    • -

      Default sorting considers recent files and buffers and falls back on -alphabetic sorting

      -
    • -
    • -

      Searching for suffix brings the file base names exactly matching -suffix to the top

      -
    • -
    • -

      File is ranked higher if already open as a buffer

      -

      - +

    • Default sorting considers recent files and buffers and falls back on +alphabetic sorting
    • +
    • Searching for suffix brings the file base names exactly matching +suffix to the top
    • +
    • File is ranked higher if already open as a buffer -

      Click here to download or view the video in a full browser window

      -

      + + +

      Click here to download or view the video in a full browser window

    @@ -484,28 +303,18 @@

      -
    • -

      It starts by populating hashtables with project recent files and +

    • It starts by populating hashtables with project recent files and project buffer files with their base scores. Buffers get a linearly -decreasing score on the basis of their "oldness".

      -
    • -
    • -

      Projectile is invoked and the files are ranked and sorted using the -static factors. Length of the file is not considered at this time.

      -
    • +decreasing score on the basis of their "oldness". +
    • Projectile is invoked and the files are ranked and sorted using the +static factors. Length of the file is not considered at this time.
    • Once the user starts searching

        -
      • -

        The counsel--find-file-matcher is used to filter down the list

        -
      • -
      • -

        Both static and dynamic factors are applied to calculate the -scores

        -
      • -
      • -

        The files are then sorted on the basis of scores they have

        -
      • +
      • The counsel--find-file-matcher is used to filter down the list
      • +
      • Both static and dynamic factors are applied to calculate the +scores
      • +
      • The files are then sorted on the basis of scores they have
    @@ -534,15 +343,15 @@

    To completely replace counsel-projectile with this add this snippet:

    -
    (advice-add 'counsel-projectile-switch-project-action :override 'counsel-projectile-switch-project-action-find-file)
    -(advice-add 'counsel-projectile-find-file :override '+projectile-find-file)
    +
    (advice-add 'counsel-projectile-switch-project-action :override 'counsel-projectile-switch-project-action-find-file)
    +(advice-add 'counsel-projectile-find-file :override '+projectile-find-file)

    To get file icons if you have all-the-icons-ivy installed, add this:

    -
    (eval-after-load 'all-the-icons-ivy
    -  (progn (add-to-list 'all-the-icons-ivy-file-commands '+projectile-find-file)
    -  (all-the-icons-ivy-setup)))
    +
    (eval-after-load 'all-the-icons-ivy
    +  (progn (add-to-list 'all-the-icons-ivy-file-commands '+projectile-find-file)
    +  (all-the-icons-ivy-setup)))

    @@ -644,7 +453,7 @@

    repo="gleek/gleek.github.io" issue-term="pathname" label="comment" - theme="github-dark" + theme="github-light" crossorigin="anonymous" async> diff --git a/blog/installing-fedora-on-macbook/index.html b/blog/installing-fedora-on-macbook/index.html index 4e1923f8..c435d3cf 100644 --- a/blog/installing-fedora-on-macbook/index.html +++ b/blog/installing-fedora-on-macbook/index.html @@ -20,8 +20,7 @@ - - + @@ -33,162 +32,10 @@ - + + @@ -219,12 +66,12 @@

    Prerequisites

  • Get Fedora Media Writer and Fedora Workstation and install the disk image onto a USB
  • Alternatively, you can use dd utility to do the same without the Fedora Media Writer by doing

    -
    
    -    diskutil list # get the disk name from the output which is something like /dev/disk1
    -    diskutil unmountDisk /dev/disk1
    -    sudo dd if=/Users/umar/Downloads/Fedora-Workstation.iso of=/dev/rdisk1 bs=512k # notice the prepended r in the disk name
    -    diskutil unmountDisk /dev/disk1
    -
    -
    
    -cd /usr/src
    -wget https://github.com/patjak/bcwc_pcie/archive/master.zip
    -unzip master.zip
    -mv bcwc_pcie-master bcwc_pcie
    -cd /usr/src/bcwc_pcie/firmware
    -make
    -sudo make install
    -cd /usr/src/bcwc_pcie/
    -make clean
    -make
    -sudo make install
    -sudo depmod
    -sudo modprobe facetimehd
    -
    -

    Check it by running Cheese.

    +
    
    +cd /usr/src
    +wget https://github.com/patjak/bcwc_pcie/archive/master.zip
    +unzip master.zip
    +mv bcwc_pcie-master bcwc_pcie
    +cd /usr/src/bcwc_pcie/firmware
    +make
    +sudo make install
    +cd /usr/src/bcwc_pcie/
    +make clean
    +make
    +sudo make install
    +sudo depmod
    +sudo modprobe facetimehd
    +

    Check it by running Cheese.

    -
    xmodmap -e "keycode  94 = grave asciitilde"
    -xset r rate 200 38 # Increase keyboard repeat rate
    -

    You can optionally switch control and CapsLock and make Return act like control when long-pressed by installing xcape +

    xmodmap -e "keycode  94 = grave asciitilde"
    +xset r rate 200 38 # Increase keyboard repeat rate
    +

    You can optionally switch control and CapsLock and make Return act like control when long-pressed by installing xcape and running

    -
    setxkbmap -option ctrl:nocaps
    -xmodmap -e "remove Control = Control_R"
    -xmodmap -e "keycode 0x69 = Return"
    -xmodmap -e "keycode 0x24 = Control_R"
    -xmodmap -e "add Control = Control_R"
    -xcape -t 10000 -e "Control_R=Return"
    -