Skip to main content
117 votes
Accepted

Build a Faulty XKCD Browser

Python 2.7 + xkcd, 55 bytes xkcd is a third-party Python package. In Python, there is a package for everything! ...
Mr. Xcoder's user avatar
  • 42.4k
57 votes

A simple TCP server

Bash + netcat + ss + …, 65 60 characters nc -lp$1 -c'ss src :'$1'|awk \$0=\$5|tr .: +#|bc' exec $0 $1 Not a serious solution, was just curious about this ...
manatwork's user avatar
  • 20.2k
47 votes

Open the browser to http://codegolf.stackexchange.com

Oration, 41 bytes Not winning, but sure was fun. As of right now, I'm only 1 bytee behind python! I need webbrowser Now open "http:ppcg.ga" Explanation: ...
Riker's user avatar
  • 7,840
47 votes

Stack Exchange Vote Counter

jQuery + JavaScript, 85 bytes $.get("//api.stackexchange.com/posts/82610?site=codegolf",d=>alert(d.items[0].score)) ...
NoOneIsHere's user avatar
  • 2,201
42 votes

Open the browser to http://codegolf.stackexchange.com

Batch, 17 bytes Saved 3 bytes thanks to Mego. start www.ppcg.ga This will open in your default browser if you run it from the windows command line. I think it'll ...
Morgan Thrapp's user avatar
38 votes
Accepted

Open the browser to http://codegolf.stackexchange.com

GNU Emacs, 29 27 14 33 bytes (eww"codegolf.stackexchange.com") The previous answer with a URL shortener was: ...
coredump's user avatar
  • 6,780
33 votes
Accepted

Check if computer is connected to the internet

Bash (with dnsutils), 3 bytes Sends a DNS request for "." (DNS root), exit code is 0 for success and >0 otherwise. Golfed dig Test ...
zeppelin's user avatar
  • 8,486
30 votes

What's my PPCG ID?

Stack Exchange Data Explorer, 56 54 53 51 46 bytes -1 byte thanks to Hyper Neutrino. -5 bytes thanks to Giacomo Garabello. ...
totallyhuman's user avatar
  • 17.2k
26 votes

Open the browser to http://codegolf.stackexchange.com

PowerShell, 17 16 Bytes saps www.ppcg.lol Using an even shorter domain provided by Milo. saps www.ppcg.ga While ...
Matt's user avatar
  • 1,123
25 votes

A simple TCP server

Linux ELF/x86, 146 bytes ...
ninjalj's user avatar
  • 3,136
24 votes

Stack Exchange Vote Counter

JavaScript ES6, 107 bytes fetch`//api.stackexchange.com/posts/82672?site=codegolf`.then(r=>r.json()).then(b=>alert(b.items[0].score)) Real ...
Michał Perłakowski's user avatar
24 votes

Was it Really Canada Day?

Bash, 43 42 40 bytes curl -L enwp.org/$@|grep -o Canada|wc -l Uses curl, grep, and ...
SG_'s user avatar
  • 341
23 votes

A simple TCP server

C#, 284 283 282 278 274 254 bytes ...
LegionMammal978's user avatar
22 votes

Open the browser to http://codegolf.stackexchange.com

Terminal (OSX), 20 18 17 bytes open http:ppcg.ga Saved 2 thanks to CoolestVeto
Mwr247's user avatar
  • 3,572
21 votes

Stack Exchange Vote Counter

Bash, 80 79 75 69 bytes w3m api.stackexchange.com/posts/82616?site=codegolf|tr ,: \\t|cut -f20 For scoring purposes, \t ...
Dennis's user avatar
  • 210k
21 votes

Average Length of Google

Bash + system utilities, 56 53 49 48 bytes Update: saved 4 bytes thanks to Digital Trauma and 1 byte more thanks to Dennis ...
seshoumara's user avatar
  • 3,706
21 votes

Build a Faulty XKCD Browser

Python 2 + Requests, 104 102 95 94 bytes -2 bytes thanks to Erik the Outgolfer. -1 byte thanks to Jonathan Allan. ...
totallyhuman's user avatar
  • 17.2k
20 votes
Accepted

Martin vs Dennis - Round 1: Who has more rep?

05AB1E, 65 64 bytes Code: •в=6{•5ôvy’ƒËŠˆ.‚‹º.ŒŒ/†š/ÿ’.w’„Ö="ˆ"’¡1èт£þ}})ZQā*O<“D M·‡“#è Uses the 05AB1E encoding. Explanation: ...
Adnan's user avatar
  • 44.4k
19 votes

Check if computer is connected to the internet

Bash + GNU utils, 8 5 bytes saved thanks to @Muzer. wget to. The other shell answers check the return code and echo some status output accordingly. This is ...
Digital Trauma's user avatar
18 votes

Martin vs Dennis - Round 1: Who has more rep?

PowerShell v3+, 147 123 119 103 101 96 Bytes $a,$b=irm api.stackexchange.com/users/12012`;8478?site=codegolf|% I*|% r*n;$a-$b|% T*g "D;M;Tie" Saved 24 ...
colsw's user avatar
  • 3,367
18 votes

Build a Faulty XKCD Browser

Python 2 + xkcd, 82 bytes Poorly written script lambda n:eval("'''%s'''"%xkcd.getComic(n).altText.replace(';;',"'''")) import xkcd Appends and prepends ...
hyper-neutrino's user avatar
  • 42.4k
18 votes
Accepted

What's my IP Address?

Bash + curl + iproute2, 54 50 49 48 33 bytes ip r g 1|awk '$0=$7' curl eth0.me Thanks @DomHastings for golfing off 1 byte! Thanks @Sisyphus for coming up with a ...
ბიმო's user avatar
  • 16.8k
17 votes

Average Length of Google

MATL, 28 bytes :"'http://google.com'Xin]vYm Gif or it didn't happen: How it works ...
Luis Mendo's user avatar
  • 104k
16 votes

A simple TCP server

NodeJS, 146 134 127 bytes require('http').createServer((q,s)=>s.end(eval(0+q.socket.remoteAddress.replace(/^.*:|\./g,'+'))+'\n')).listen(process.argv[2]) I ...
nickb's user avatar
  • 341
16 votes

Martin vs Dennis - Round 1: Who has more rep?

Python 2, 160 bytes ...
Dennis's user avatar
  • 210k
16 votes

Is this site down or is it just me?

sh (+ curl + grep), 28 26 bytes curl -L isup.me/$1|grep ^I Outputs via exit status (0 for up, 1 for down). Looks for an I at ...
Anders Kaseorg's user avatar
15 votes

A simple TCP server

Tcl, 92 1 byte saved thanks to @DonalFellows. proc s {c a p} {puts $c [expr [string map .\ + $a]] close $c} socket -server s $argv vwait f Fairly self-...
Digital Trauma's user avatar
15 votes

Was it Really Canada Day?

Perl 5, 39 bytes 38 bytes, plus 1 for -pe instead of -e ...
msh210's user avatar
  • 3,443
15 votes

Leave a Comment

AppleScript with Safari, 269 287 bytes ...
Allison's user avatar
  • 251

Only top scored, non community-wiki answers of a minimum length are eligible