Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 68543

Code-golf is a competition to solve a particular problem in the fewest bytes of source code.

13 votes

Diagonal Alphabet

Vim, 29 bytes :h<_↵↵↵y$ZZ25o <Esc>{qqpblD+q25@q Try it online! ↵ means press the return key < Esc> means press the escape key How does this work? :h<_↵↵↵ Open the he …
jmriego's user avatar
  • 421
1 vote

Interleave numbers from 1 to n, with the same numbers reversed

AWK, 34 30 bytes {for(i=1;i<=$1;i++)printf i$1-i+1} {for(;i<$1;i++)printf i+1$1-i} Try it online!
jmriego's user avatar
  • 421
4 votes

Remove character at specified index

Vim, 7 bytes jDk@"|x How it works: It expects two lines; one with the string and one with the number. Go to line two, copy the number into register Go to first line and then go to column in the …
jmriego's user avatar
  • 421
9 votes

Tell me my screen resolution!

AutoHotKey, 34 bytes SysGet,w,0 SysGet,h,1 Send,%w%x%h% Save this in a file with extension .AHK and run it from a command prompt
jmriego's user avatar
  • 421
5 votes

Get rid of whitespace on otherwise empty lines

AWK, 12 11 bytes !NF{$0=""}1 Try it online! I was just feeling like AWK should have an answer too It works by: Checking if there are no fields in the input. AWK by default uses all whitespace a …
jmriego's user avatar
  • 421