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!
...
67
votes
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 ...
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:
...
47
votes
Stack Exchange Vote Counter
jQuery + JavaScript, 85 bytes
$.get("//api.stackexchange.com/posts/82610?site=codegolf",d=>alert(d.items[0].score))
...
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 ...
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:
...
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
...
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.
...
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 ...
25
votes
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 ...
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 ...
23
votes
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
21
votes
The World's Smallest Web Browser
PHP, 175 bytes (215 - 40 bonus) 227 229 239 202 216 186 bytes
Have fun browsing the web:
...
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 ...
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
...
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.
...
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:
...
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 ...
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 ...
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 ...
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 ...
17
votes
Accepted
Code Golf : Parsing google results
Bash + grep + lynx, 38
Since we can open a web browser, then I will use lynx:
lynx -dump $1|grep -Po '(?<=d:)[^&]+'
(...
17
votes
Average Length of Google
MATL, 28 bytes
:"'http://google.com'Xin]vYm
Gif or it didn't happen:
How it works
...
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 ...
16
votes
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
internet × 119code-golf × 107
stack-exchange-api × 21
parsing × 13
string × 7
random × 4
quine × 4
code-challenge × 3
decision-problem × 3
sequence × 2
kolmogorov-complexity × 2
tips × 2
graphical-output × 2
self-referential × 2
search × 2
browser × 2
number × 1
array × 1
popularity-contest × 1
date × 1
graph-theory × 1
image-processing × 1
regular-expression × 1
bitwise × 1
classification × 1