Skip to content

Instantly share code, notes, and snippets.

Anirudh Vyas AnirudhVyas

Block or report user

Report or block AnirudhVyas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AnirudhVyas
AnirudhVyas / PTYTopper.go
Created Apr 10, 2017
Copy seamlessly results of top command remotely run to connection
View PTYTopper.go
// To use telnet 127.0.0.1 12345
func main() {
// spin off sample server to test ...
l, _ := net.Listen("tcp", "127.0.0.1:12345")
for {
c, _ := l.Accept()
go func() {
handle(&c)
}()
}
@AnirudhVyas
AnirudhVyas / ScalaCheatSheet.scala
Created Mar 30, 2017
Scala Cheat sheet - stuff to remember
View ScalaCheatSheet.scala
object ScratchPadApp extends App {
// This is WIP --- haven't added a lot of stuff to these...
val s = "ONE EXAMPLE of a String"
val ss =
"""
|
|I
|AM A
|MULTI
@AnirudhVyas
AnirudhVyas / RandomPasswordGenApp.scala
Created Nov 26, 2016
A utility password generator
View RandomPasswordGenApp.scala
// something to make things interesting
val uuid = UUID.randomUUID().toString
println("Enter a suitable password that you wish to use (this will serve as root)")
// your root password goes here
val password: String = scala.io.StdIn.readLine()
// gives you a number with root
println(s"Your new generated password is $password${uuid.take(7).foldLeft("")((c, d) ⇒ c.toLowerCase + d.toUpper)}")
You can’t perform that action at this time.