Skip to content

Commit 0bbaae7

Browse files
committed
Merge pull request NARKOZ#49 from waksana/master
fucking coffee using coffeescript
2 parents 4b10764 + 95a25f2 commit 0bbaae7

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

coffee/fucking.coffee

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env coffee
2+
3+
username = 'name'
4+
5+
host = 'localhost'
6+
port = '3000'
7+
pass = '5555'
8+
9+
sh = require('child_process').execSync
10+
11+
# weekend
12+
process.exit 0 if new Date().getDay() in [6, 0]
13+
14+
# no sessions
15+
process.exit 0 unless new RegExp(username).test sh('who -q').toString()
16+
17+
conn = require('net').createConnection(port, host)
18+
19+
setTimeout ->
20+
conn.write "#{pass}\nsys brew\n"
21+
setTimeout ->
22+
conn.end 'sys pour'
23+
process.exit(0)
24+
, 2 * 1000
25+
, 1 * 1000
26+
27+
# alert
28+
sh('say come here and take your fucking coffee')

0 commit comments

Comments
 (0)