From c0f89448357e8bd8e1814389a5880d37681766da Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Wed, 11 Aug 2021 22:42:12 +0700 Subject: [PATCH] i love julia --- bash/.bashrc | 1 - bin/idea | 25 +++++++++++++++++++++++++ bin/mkcd | 4 ++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100755 bin/idea create mode 100755 bin/mkcd diff --git a/bash/.bashrc b/bash/.bashrc index cb09a5b..755ffb3 100755 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -128,4 +128,3 @@ sudo /etc/init.d/dbus start &> /dev/null . "$HOME/.cargo/env" export EDITOR="micro" -alias idea="eureka" diff --git a/bin/idea b/bin/idea new file mode 100755 index 0000000..662f186 --- /dev/null +++ b/bin/idea @@ -0,0 +1,25 @@ +#!/usr/bin/env julia + +homePath = homedir() + +cd("$homePath/repository/ideas") + +if length(ARGS) == 0 + println("gimme some idea dude") + exit(0) +end + +category = ARGS[1] * ".md" +idea = copy(ARGS) +popat!(idea, 1) +idea = join(idea, " ") + +open(category, "a") do io + write(io, "- $idea\n") +end + +run(`git add .`) +run(`git commit -m "new idea on $category"`) + +println("your idea on $category has been added and commited to the repo") +exit(0) diff --git a/bin/mkcd b/bin/mkcd new file mode 100755 index 0000000..cb3817d --- /dev/null +++ b/bin/mkcd @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +mkdir $1 +cd $1