Hacker Newsnew | past | comments | ask | show | jobs | submit | nickwoodhams's commentslogin

We're also hacking on a more in-depth version https://theworkmob.com/sitdowns/demo/

Love to hear what you all think


Based on data Wednesday at 1AM Mountain Time

Actionscript 21.22%

Ada 109.92%

Assembly 247.81%

C 700.00%

C++ 69.75%

C# 241.94%

Clojure 363.72%

Cobol 6.38%

CoffeeScript 81.26%

ColdFusion 6.09%

D 162.59%

Delphi 64.06%

Erlang 332.28%

Forth 219.63%

Fortran 48.24%

Go 308.56%

Groovy 45.58%

Haskell 391.49%

Java 46.51%

JavaScript 159.88%

Lisp 435.29%

Lua 526.32%

Objective-C 71.76%

OCaml 268.64%

PHP 30.28%

Pascal 106.33%

Perl 66.31%

Python 636.01%

R 122.91%

Rexx 43.48%

Ruby 162.21%

Rust 376.99%

Scala 161.52%

Scheme 525.41%

Shell 126.68%

Smalltalk 239.60%

SQL 254.29%

Tcl 56.31%

Visual Basic 12.26%

Other 155.56%

F# 270.00%


You can check out a sample of my work here: http://nwdesign.us


Corrected this typo. Thanks.


Glad it helped you! :)


Please comment if you have a favorite not on this list.


'tac'. It is 'cat', but backwards.


Are you some kind of genius?


If you enjoy 'tac', you might also enjoy 'sponge'.

Spong 'soaks up' input an releases it all on one chunk so that you can do things like:

  cat foo | sponge foo
(`cat foo > foo` does not work)

That's neat and all, but what if you don't have sponge? Well, just use tac twice!

  cat foo | tac | tac > foo
(Obviously this is rather wasteful ;))


I cannot understand how this works.

"cat foo > foo" breaks, because the shell truncates the file "foo" while it's setting up the redirection, before it launches "cat foo", and so cat has nothing to read.

"cat foo | sponge foo" works because the shell is not responsible for writing to foo; it launches cat (which opens the file for reading) then launches sponge (which eventually opens the file for writing).

I would thus expect "cat foo | tac | tac > foo" to fail in the same way as "cat foo > foo" because the shell is still going to open the file foo and truncate it, but experimentation shows that it does actually work. Is it because the shell launches each pipeline one at a time, so cat has read the file before "tac > foo" truncates it? Is it a race-condition or a corner-case?


That's a good question. I had though it worked because the truncate would not actually happen until tac actually wrote something, but now that I look at it more I don't think that is actually the case. `cat > foo` immediately truncates foo before anything is written. Also `tac foo > foo` doesn't work, which discredits my hypothesis that tac's buffering was causing it.

Furthermore `cat foo | cat > foo` does not work, but `cat foo | cat | cat > foo` does work.

I suspect this behavior is actually a race condition of some sort.

Edit: definetly a race condition, shown by larger files:

  % wc -l foo
  1310720 foo
  % cat foo | cat | cat > foo
  % wc -l foo
  16384 1


I always get confused between "tac" and "rev", which is also "cat, but backwards" for a certain definition of "backwards".


When rewriting large amounts of ASCII text (or comments in Code), I really find "par" helpful.

    : Just use it in :
    : vi with your cursor in front of a badly wrapped block of text. :
    : Press !}par<enter> and the text will be :
    : piped to par :
    : which fixes up :
    : the :
    : formatting and keeps aligned frame markers :
    : intact magically. :


    : Just use it in vi with your cursor in front of a badly wrapped   :
    : block of text. Press !}par<enter> and the text will be piped     :
    : to par which fixes up the formatting and keeps aligned frame     :
    : markers intact magically.                                        :
http://www.nicemice.net/par/ (or apt-get install par)


Or you can just select the block of text and type gq. This will do what par does, and can be adjusted with vim's 'textwidth' and 'formatoptions' settings.


If you use tmux (or screen) you want to use byobu!

https://launchpad.net/byobu

https://www.google.de/search?q=byobu+tmux&tbm=isch

It's a fancy statusbar that shows CPU speed, IP-address, hostname, ...


You can get a fancy status bar with screen, you just need a screenrc file: http://www.mbeckler.org/blog/2012/11/28/my-screenrc-file-cir...


Another option is tmux-powerline[1]

[1] https://github.com/erikw/tmux-powerline


I have something similar in my .tmux.conf file

Screenshot: http://i.imgur.com/u6JY0.png

Config file: https://github.com/tylerkahn/dotfiles/blob/master/.tmux.conf...

Works with OSX and Linux.


    export CDPATH=.:~/projects
    export PS1="$(uname -n)$ "
    alias ltr='ls -ltr'
More of a procedure, always list file and edit the command before deleting it:

    $ ll file.txt
    -rw-r--r--  1 zera  staff  0 Jan  7 20:28 file.txt
    Ctrl-p, Ctrl-a, Ctrl-d, Ctrl-d, r,m
    $ rm file.txt
So this is a sanity check to avoid this mistake:

    $ rm *.txt
*Edit, one more:

Ensure you overwrite a file (or aren't):

    $ cp -i ~/file.config /etc/


    alias lsd="ls -ltrF | grep ^d"
Helps me quickly list only directories. Any better alternatives ?


Using `find` is nice to get just directories:

$ find . -type d -maxdepth 1


I use:

% ls -d */


ls -al | grep ^d


(Fails if a directory has a linefeed in its name followed by a 'd'. :-)


  find . -type d
edit: for the same output as your command you can use:

  dir -l


Dunno what "better" means, but this also works:

find -maxdepth 1 -type d


seconded. what I have always used


Depends on the shell. In zsh (with EXTENDED_GLOB): *(/) matches only directories.


I usually

    alias lsd='ls -d */'


echo */ (perfect when your unable to fork)


ls -l | grep drw

I know, it's a bad habit


alias emacs="nano"


export EDITOR=/usr/bin/nano


nooooooo!


tsort. It's pointless until you need it, but when you need it, it's totally awesome.

less. Overkill, but SO MUCH BETTER THAN tail -f. Seriously. You can toggle "follow mode" without losing your place in the incoming stream.


> less. Overkill, but SO MUCH BETTER THAN tail -f. Seriously.

If you do this on my servers, I am going to find you, and then I am going to kill... um... your process.

less with SHIFT-F takes a whole CPU core to run on a busy log file. tail -f takes almost nothing to run. Now combine that information with the reality of a whole bunch of devs who don't know it or don't care about it. :(


I prefer:-

    tail --follow=filename
to:

    tail -f filename
The former will spot inode changes and reopen the filename if the file wraps (or has something else done to it to change its inode). The latter will just sit there seeing no new input in such cases.


Hm, can you start at the end of file without reading the entire file with less? Use case is tailing large logs.


Yes, either type G when presented with the top of the file or pass +G on the command line. It will then read all the intervening file to calculate the line numbers, and tells you it's doing this and to interrupt it to stop. To prevent it doing this in the first place use the -n option.

"less -n huge_file" and then G only reads the start and end of the file. Type G again to move to the latest end of the file if it's growing.


Yes. It is CPU intensive (see auntie post above).


multitail[1] is also really nice for following multiple log files. It can do highlighting of lines based on regex's, and has built-in highlighting of a wide variety of log formats

[1] http://www.vanheusden.com/multitail/features.php


Does anybody know if there is a good standalone regex highlighter? I usually use `ack --passthru`, but that has always seemed a tad.. overkillish to me.


    sl


dtrace :P


What happens when someone nearby using your Karma buys more data and the you pack up and leave?


Hey Dennis, this list was really fun to go through. Discovered some cool stuff. Thanks.


Hey Drew,

Site looks great-

Hate to tell you though, I beat you to it by a few months :)

http://easybill.co

Different pricing structure. Driving keyword traffic has been a bit of a challenge. I think that this is a tough value prop for customers.

Overall, site looks great, wish you the best with it.


Just a bit of feedback on your test forms: Your credit card number doesn't chunk the credit card into segments, making the input really difficult. And the sliding text when fields get focused is distracting.

Also as a question. Does my subdomain have to be nickw.easybill.co or will it be specific to my account? (not clearly stated)


Good job, and bookmarked. When Stripe makes it to Europe / Australia, you'll have another customer.


Fyi your site is pretty broken on Nexus 7, maybe on other mobile Chrome browsers too?


Agreed, I am more confident with Amazon S3 as opposed to an undisclosed private server.

I like that the instructions guided you through creating a secured tar file.

I like the idea of Tar backups, but no offense to you, I just don't trust the reliability. You can't offer a resilient backup service entirely free, it just doesn't work. Storage costs money, and developers know that better than anyone else.

That being said, the actual code looks pretty simple.

Think you're on the right track here. Don't think I would pay for the service though.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: