Skip to content

Instantly share code, notes, and snippets.

@evnpr
Created October 11, 2012 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evnpr/3869389 to your computer and use it in GitHub Desktop.
Save evnpr/3869389 to your computer and use it in GitHub Desktop.
To send ipconfig file every 30 seconds
tmd = 0
while 1
t = Time.now
tm = t.sec
if tm%30 == 0
tmo = tm
if tmd == 0
puts Time.now
file = File.open("iptime.txt","w")
file.write(Time.now)
file.close
`ipconfig > ip.txt`
`git add .`
`git commit -m 'a'`
`git push origin master`
end
tmd = 1
end
if !tmo.nil?
if tm == tmo + 5
tmd = 0
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment