Brad Lucas

Programming, Clojure and other interests

Insert Org Mode Line

July 7, 2017

If you use org-mode a lot you'll eventually look to a way to quickly setup a new file with your favorite settings. Here I use the following to quickly add the org mode line and a few favored settings.

(defconst *org-modeline*  "# -*- mode:org; -*-")
(defconst *org-mode-settings* "
#+STARTUP: showall
#+STARTUP: hidestars
#+OPTIONS: toc:nil
#+OPTIONS: skip:t
#+HTML_HEAD: <link rel=\"stylesheet\" type=\"text/css\" href=\"./org.css\" />
#+OPTIONS: ^:nil

* HEADING
")

(defun insert-org-modeline ()
  (interactive)
  (save-excursion
    (beginning-of-buffer)
    (insert *org-modeline*)
    (insert *org-mode-settings*)
    (newline)
    (newline)
    )
  (end-of-buffer)
  (save-buffer))

Feel free to add or modify to make the above your own.


Continue reading →

Function update-work

July 6, 2017

I've had a long time practice of putting all my projects in their own repositories and keeping them in a work directory under my home directory. I even start repos for personal projects as well as various of interest items. Smaller lists and plans go into more general repos and everything is organized and backed up in a source control system.

With this I've ended up creating various functions to help manage things. For example, the following update-work bash function goes through my work directory and runs the git status command in each directory which is a git repo.

function update-work {
    pushd "$HOME/work"
    for f in `find . -maxdepth 2 -name .git`
    do
        echo "--------------------------------------------------"
        echo "REPO: $f"
        pushd "${f%/.git}"
        git status
        popd
        echo "--------------------------------------------------"
    done
    popd
}

Continue reading →

GitX

July 5, 2017

Whenever I need to look at a Git repository in a visual way I pull out GitX. Today, I thought to mention it in case anyone is looking for a Git gui for the Mac.

I've used GitX for a number of years and have yet to find a reason to try anything else.


Continue reading →

Tokenwatch (Part 2)

July 4, 2017

Once part 1 of TokenWatch was done the next step appeared when you saw all the details on each entries interior page. There I was most interested in the links to the Whitepapers so I could collect them and read through them more easily as a group.

For this part of the project I created another script tokenwatch_details.py which extends the previous tokenwatch.py script.

Code

To start I'll be getting the dataframe from the tokenwatch.py script sorted by NAME.


Continue reading →

Tokenwatch (Part 1)

July 3, 2017

Continuing with my research into tokens and blockchain assets I found another site called TokenMarket.net. This site includes ICOs which are running as well as upcoming campaigns.

In a similar fashion as previous post (http://blog.bradlucas.com/posts/2017-07-01-coin-market-cap/) I decided to scrape the site so I could group the entries by status more easily. The result of this is a Python script called tokenwatch.py.

The following are some highlights to get the script working.

Table Data


Continue reading →