Skip to content

Instantly share code, notes, and snippets.

Janos Gyerik janosgyerik

Block or report user

Report or block janosgyerik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View blog-post-ideas.md
@janosgyerik
janosgyerik / hats.md
Last active Aug 29, 2015
Hats to go for
View hats.md

Werewolf Hunter

  • Programmers
  • Ask Ubuntu

Tam o' Shanter

  • Unix & Linux
  • Super User
View annual-team-meeting.md

Hey guys,

A new year is a new beginning, and a good time for changes.

I’d like to have a free discussion with you, while having breakfast, to talk about last year and the coming new year:

  • What we did right and should keep doing
  • What we did wrong, what didn’t work, and should stop doing
  • New ideas we can do for this year
View cr-answer.md

http://codereview.stackexchange.com/questions/83601/finding-the-mth-to-last-element

If I'm interpreting the definition right, the input contains single letters, all delimited by precisely one space character, and at the end of the line is a single digit (1 to 9). This is the way it seems to make the most sense. I will assume this interpretation in my answer.

First, to make the solution testable, I'd extract the main logic to a function that takes a line and returns the mth-to-last character or 0 (that's different from '0', mind you) if m is out of range.

View cr-dup-finder.md

Don't you hate it when the same file exists at multiple places. I do so, I wrote a simple utility to help clean them up.

The program takes a directory name on the command line, and traverses the filesystem tree recursively, collecting all files. Since comparing content can be expensive, to minimize the number of comparisons, I thought a merge sort logic would be effective.

View cr.md
View feeds-in-chatrooms.md

Not in the 2nd monitor

Instead of posting all recent answers, how about posting only zombie killers?

What's a zombie killer? Answer on a question with no other non-deleted answers.

As a twist, to avoid encouraging FGITW style answers, add a date condition: the question must be more than X days old.

But, I don't know how much noise this will generate, and if the 2nd monitor can take it. I think it would be too much. So instead of unleashing this on the 2nd monitor, how about a new room for it called Zombie Killers.

@janosgyerik
janosgyerik / dot.gitconfig
Created May 14, 2012
My typical .gitconfig
View dot.gitconfig
[user]
name = Janos Gyerik
email = janos@example.com
[alias]
st = status
ci = commit
br = branch
co = checkout
ls = ls-files
View Increase-JVM-heap-size.txt
java -Xms64m -Xmx256m -XX:MaxPermSize=128m HelloWorld
You can’t perform that action at this time.