viccherubini / get-shit-done Goto Github PK
View Code? Open in Web Editor NEWSmall script to configure your hosts file so you don't get distracted during the day.
Home Page: http://viccherubini.com
Small script to configure your hosts file so you don't get distracted during the day.
Home Page: http://viccherubini.com
From this line, it appears that only the first item in the array is loaded as all other items are cut by the assignment. The whole approach of using arrays and iterating with for loops is really inefficient and produces unexpected bugs.
If I hard link the wrapper script get-shit-done
to my path and reload, calling the script yields the following:
jeffreyhorn@hook:~/src/get-shit-done 2011-05-17 08:35:22 git:master
>> get-shit-done work
/Users/jeffreyhorn/bin/get-shit-done: line 14: /Users/jeffreyhorn/bin/get-shit-done.php: No such file or directory
Symllinking instead of hard linking fails to make bash aware of the script.
After installing get-shit-done, I received the following error when I tried "sudo get-shit-done play":
sed: illegal option -- - usage: sed script [-Ealn] [-i extension] [file ...] sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
The only thing I did differently from the suggested installation is that, rather than adding the get-shit-done directory to my path, I created an alias to it.
alias get-shit-done="~/environment/submodules/get-shit-done/get-shit-done.sh"
Using get-shit-done requires sudo, though, which required this additional addition to process aliases (https://wiki.archlinux.org/index.php/Sudo#Passing_aliases):
alias sudo='sudo '
I apologize if that's a red herring, but I wanted to note the difference in case it's relevant.
I was able to fix the error by changing line 112 of get-shit-done.sh:
OLD: sed --in-place -e "$sed_script" $file NEW: sed -i -e "$sed_script" $file
Anyone have any insight on this? Do I have a different version of sed than the script expects?
I am getting the following error when trying to go to play-mode:
[.bin]=> sudo bash get-shit-done.sh work
[.bin]=> sudo bash get-shit-done.sh work
[.bin]=> cat /etc/hosts
## start-gsd
127.0.0.1 reddit.com
127.0.0.1 www.reddit.com
(...)
## end=gsd
## start-gsd
127.0.0.1 reddit.com
127.0.0.1 www.reddit.com
(...)
## end=gsd
[.bin]=> sudo bash get-shit-done.sh play
sed: illegal option -- -
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
So there is duplicates in the /etc/hosts
-file and the play-script is not working.
How is the inifile supposed to be useful if run as root?
The inifile is placed under ~/.config
. If the script is run as root, then the inifile must be placed under /root/.config
. I find that unpractical. The inifile path should be passed on the command line and not be hardcoded.
Adding a timer, which stops users from entering the play command before a certain point in time would really help alot.
A quick Google search turned up nothing. There must be some network daemon at work, since programs like Freedom and Concentrate can block networking and specific sites, respectively. Any ideas?
That's some ubuntu/debian magick. Say, arch has only /etc/rc.d/network, and it's not really needed, as far as I can tell, and I think that line's redundant and should be removed. (I'm talking about the line 34, of course.)
% sudo get-shit-done play
sh: /etc/init.d/networking: No such file or directory
Little more instruction on how to use this software would be helpful for people with less knowledge.
At least on my computer running fedora, the command to restart the network is this.
$ sudo /etc/init.d/network restart
Restarting network (via systemctl): [ OK ]
$ uname -a
Linux hh-desktop.1aauto.local 3.8.4-102.fc17.x86_64 #1 SMP Sun Mar 24 13:09:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
That seems to be the case in other linux flavors.
http://blog.hpxn.net/2009/01/29/restart-network-service-in-redhat-centos-fedora/comment-page-1/
I want to also block the site "instructables.com" (for example).
When I extract the downloaded zip-File in Ubuntu, I get these files:
get-shit-done
get-shit-done.php
get-shit-done.py
get-shit-done.sh
README.md
sites.ini
So I figured that I just have to open sites.ini with gedit and add "instructables.com" to block it. However, this does not work. So what do I have to do instead?
Thanks.
The blocked sites that come with the script by default are lacking.
Needs locally modifiable, installation specific lists.
If I get time, I will work on it and submit a patch, but I believe it needs to be done regardless.
In getting-shit-done (as I understand) users might easily switch to play mode because they feel like wasting time. There is a way to deter the user using delayed admin. So I suggest that get-shit-done should be used along with delayed-admin.
Sadly, "get-shit-done" does not work with domain endnings other than ".com". For example, there is no way to block "lemonde.fr".
Could you do something about this?
I need it badly :-) Thanks!
surely this should be a demon >:D
(this is a joke)
I installed get-shit-done on my mac and turned on work mode with "sudo get-shit-done work". Distracting sites are being blocked and work is getting done, but I can't turn it off.
Can't...stop...working! This is more hardcore than I expected!
Anyhow, so "sudo get-shit-done play" executes without response and doesn't turn it off. "sudo get-shit-done work" replies with "Work mode already set.", so the path configuration to the executable would seem to be set properly. Any idea what could be going wrong? Thanks!
Why not just make use of an HTTP proxy? No need for sudo
, and it can be used on a multi-user system, as well as be configured per-application.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.