Commit Graph

48 Commits (a35fd2cea03d2a906c19072aca458fdca344e0b4)

Author SHA1 Message Date
nirenjan 09b20d3a0a Update smartwd to be compatible with Python 3
Prior to this change, running smartwd in a virtualenv with Python 3 gave
a syntax error due to the script treating `print` as a keyword, rather
than a function.

This change fixes the print to work as a function, and also cleans up
some of the comments and code to better comply with PEP8
2018-09-27 13:48:57 -07:00
nirenjan d2f9c5cdc7 Add simulation of hub clone
I don't want to get a full hub install, not yet anyway.
2018-05-03 14:09:28 -07:00
nirenjan 50d31b6c7e Add script to update GitHub remotes to use the URL aliases 2018-05-03 13:49:24 -07:00
nirenjan 7e4b71c044 Add 'scripts/' from commit '0e3760e65e20817dab6c03efee9ef545c80eed69'
git-subtree-dir: scripts
git-subtree-mainline: 2c08462a0f
git-subtree-split: 0e3760e65e
2018-04-28 10:19:41 -07:00
nirenjan 2c08462a0f Remove submodules - replace with subtree 2018-04-28 10:19:28 -07:00
nirenjan 543cb025ef Update scripts to use new python smartwd 2016-03-26 13:18:36 -07:00
nirenjan 213924ce37 Update scripts submodule 2015-06-26 15:00:13 -07:00
nirenjan 0081ee9d81 Update scripts submodule 2015-06-26 14:45:10 -07:00
nirenjan e333aac538 Update scripts submodule 2015-02-25 12:09:49 -08:00
nirenjan 34e2aa2593 Update scripts subproject 2014-09-24 22:54:05 -07:00
nirenjan 9f75a8b596 Move scripts to submodule 2014-05-26 09:31:23 -07:00
nirenjan 3e68eb0970 Add commands to set executable permission on file
The deploy script was simply redirecting the contents of the files into
the target files, however, they were getting created without executable
permissions. Since this script is designed to deploy executables, it is
required to set the executable permissions.

This cannot be done in the deployment configuration file however,
because the script parses all the input files first before extracting
the relevant contents. Therefore, if we try to run chmod +x within the
file, it would fail because the file would not exist yet (or run deploy
twice).

This commit also cleans up the formatting when building the command line
so that each command is set up on it's own line.
2013-10-17 11:59:09 -07:00
nirenjan 5ab3d000a3 Add deploy script to install files from Git repos
Deploy files are bash scripts with a couple of extra commands - namely
the repo, target and file commands. This allows a user to specify a
deployment file with a source repository, destination folder and
specific Git version to extract.
2013-10-16 21:41:04 -07:00
nirenjan 952067e854 Remove the temporary file before exiting mlog 2013-09-30 20:46:50 -07:00
nirenjan 758c1a88ee Print a full 80-char separator in mlog 2013-09-17 15:00:36 -07:00
nirenjan a44e75119c Add supplemental log handling to mlog
This also takes care of deleting temp log files
2013-09-10 14:05:00 -07:00
nirenjan d37bb6c9ce Script to track daily work items
Work items are logged against a monthly file, so you can quickly see at
a glance what your activities were for the last month
2013-09-09 23:59:34 -07:00
nirenjan 95c8ad2490 Add applygitconfig script
Simple Perl script to apply a git config from any gitconfig file
2013-08-09 19:34:27 -07:00
nirenjan 7ceee1933a Fix comment in stardate script 2013-08-07 15:47:54 -07:00
nirenjan a1b0e38245 Rename sdate script to 'stardate' 2013-05-16 13:36:35 -07:00
nirenjan 66f3164bda Improve precision on stardate script
There is a possibility that for every 0.1 stardates (8640 seconds),
the final 0.05 stardate would get rounded up (432 seconds). This kind
of inaccuracy is unacceptable by Starfleet standards, so I've reduced
the inaccuracy to 5e-10 stardates or 43.2 microseconds.
2013-05-03 22:26:43 -07:00
nirenjan 9d02e9d8d0 Fix stardate script to truncate instead of round 2013-05-01 22:43:36 -07:00
nirenjan 38a6c23cc8 Reformat smartwd indentation to compy with Ruby coding guidelines 2013-04-12 15:07:39 -07:00
nirenjan 4413d17282 Fix smartwd script to ensure that it always works
With Ruby version 1.8.5, the smartwd script would abort with an error that
the shift method would take no arguments. Therefore, I have restricted the
use of the script to ruby version 1.8.7 and above.

On older versions, it will simply behave the same as \w in PS1 of bash.
2013-02-19 15:14:12 -08:00
nirenjan 717dacdf67 Enhance precision in sdate display 2013-02-19 15:00:03 -08:00
nirenjan 445d1453b7 Fix beep script to always send ^G 2013-02-19 14:57:30 -08:00
nirenjan 48e6e5edcc Fix smartwd script and update PS1 in bashrc.common 2013-02-14 14:11:12 -08:00
nirenjan 7e6df80ce8 Add smartwd script - WIP 2013-02-14 10:57:42 -08:00
nirenjan 4c99a14532 Allow user to pass in grep pattern
This also disables the search by word, so to search only by word
boundaries, surround the pattern by \< and \>
2013-02-11 15:39:15 -08:00
nirenjan a00d7dff70 Add git-branch-parent script from git-scripts repo 2013-02-06 21:59:02 -08:00
nirenjan 92129f2357 Rename commands and add short forms 2013-01-31 15:27:21 -08:00
nirenjan 5722777037 Fix note to use openssl MD5 instead of md5sum 2013-01-31 14:59:23 -08:00
nirenjan aacb9c46a2 Add beep script
This script evaluates the commands specified on the command line and
sends a beep to the terminal after the command completes execution. In
tmux, this results in the window status bar displaying the beep signal.
2013-01-31 14:52:41 -08:00
nirenjan 553b5dc790 Fix check_empty and add show command to note
check_empty for restore was trying to run a git checkout in the current
working directory, instead of in the ~/.notes directory. Fix this issue

note_show uses less to display the contents of the note file.
2013-01-31 13:33:33 -08:00
nirenjan c22b902a90 Add search functionality to note
Also tweak new and edit commands to delete/restore note if the file
is empty.
2013-01-30 19:25:32 -08:00
nirenjan 6f48978ef4 Fix note script for title renaming
Also add a debug print statement for when NOTES_DEBUG is set.
2013-01-30 18:04:21 -08:00
nirenjan 76f1a4eff0 Fix title renaming for a new note 2013-01-24 19:27:39 -08:00
nirenjan 5f04cc0040 Fix note issues
Fix the following issues in note
1.  Always use a combo of lowercase letters, hyphen, underscore and
    numbers for the file name. This is taken from the title and uses sed
    to translate the uppercase letters to lowercase. Unfortunately,
    sed's translation mode doesn't support ranges, so we must use the
    full alphabet.
2.  Add support for displaying version information.
3.  Reformat the help display so it all fits in a single line.
4.  Add checking to ensure that at least one argument is passed to note
    so that the parse_args routine doesn't barf an error with shift.
5.  Remove argument checking in notes_init. It's called only by the init
    function, so there's no need to add a flag to control warnings.
2013-01-23 22:20:06 -08:00
nirenjan 7bf597a69d Add note script 2013-01-23 20:58:18 -08:00
nirenjan 178ebe4f0e Speed up stardate counter (1 SD = 1 JD) 2013-01-22 16:58:43 -08:00
nirenjan ff2be1cada Ignore COLOR, OPTIONS and EIGHTBIT keywords 2013-01-22 11:22:22 -08:00
nirenjan 91628fe781 Add script to test dircolors file
This Perl script reads a valid dircolors configuration file and prints
the colorscheme used by 'ls --color' for each file type (and extension).

Error checking is non-existent. The script assumes that your dircolors
file is valid input for the dircolors program.
2013-01-21 22:09:50 -08:00
nirenjan 384060f13e Delete obsolete scripts 2013-01-21 17:36:07 -08:00
nirenjan d348aef645 Tweak sdate script to print correct Julian date
The existing script was rounding the computed Julian date which was
resulting in the script printing the next day for 12 hours in the day,
i.e., a date of 456314.5 was being printed as 45631.5 (due to the
division by 10 and rounding up by the print statement). Now, the script
computes the number of days since the epoch (JD 2000000) and drops the
fractional portion, so it will print the correct Julian date stardate,
i.e., a date of 456314.5 will be printed correctly as 45631.4.
2013-01-21 16:51:46 -08:00
nirenjan 2407365328 Add script to set Xterm/Tmux pane title 2013-01-21 13:54:57 -08:00
nirenjan a3f0b88de4 Add stardate script based on Julian date 2013-01-21 12:00:38 -08:00
nirenjan e8f11cbf79 Add Julian date script based on Unix time 2013-01-21 11:15:51 -08:00
nirenjan 0cebac58dd Move scripts to separate folder 2013-01-21 11:15:36 -08:00