If you haven't already got a ~/.ssh/id_rsa.pub on your computer, you'll need to generate one.
To generate key
ssh-keygen
To copy ssh key to your clipboard on a mac:
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Document</title> | |
| </head> | |
| <body> | |
| <script lang="javascript"> | |
| var module = function(){ |
| Options -Indexes | |
| RewriteEngine On | |
| ################################################################ | |
| ## ROUTES | |
| ################################################################ | |
| RewriteRule ^f/([A-Za-z0-9-\s]+)/?$ ./gf.php?f=$1 [NC,L] |
| function xhr(method, uri, body, handler) { | |
| var req = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP'); | |
| req.onreadystatechange = function () | |
| { | |
| if (req.readyState == 4 && handler) | |
| { | |
| eval('var o=' + req.responseText); | |
| handler(o); | |
| } | |
| } |
| <?php | |
| $userMail = 'kevinrose@gmail.com'; | |
| $imageWidth = '150'; //The image size | |
| $imgUrl = 'http://www.gravatar.com/avatar/'.md5($userMail).'fs='.$imageWidth; | |
| echo "<img src=\"$imgUrl\">"; | |
| ?> |
| <?php | |
| // Converts a number into a short version, eg: 1000 -> 1k | |
| // Based on: http://stackoverflow.com/a/4371114 | |
| function number_format_short( $n, $precision = 1 ) { | |
| if ($n < 900) { | |
| // 0 - 900 | |
| $n_format = number_format($n, $precision); | |
| $suffix = ''; | |
| } else if ($n < 900000) { |
| import android.os.CountDownTimer | |
| abstract class CountUpTimer protected constructor(private val duration: Long) : | |
| CountDownTimer(duration, INTERVAL_MS) { | |
| abstract fun onTick(second: Int) | |
| override fun onTick(msUntilFinished: Long) { | |
| val second = ((duration - msUntilFinished) / 1000).toInt() | |
| onTick(second) | |
| } |
| private fun stopCountDown(){ | |
| val t = Toast.makeText(this,"Stopping countdown",Toast.LENGTH_SHORT).show() | |
| timer1.cancel() | |
| timer1IsRunning=false | |
| } | |
| private fun startCountDown(){ | |
| timer1 = object : CountDownTimer(duration, interval) { | |
| override fun onFinish() { | |
| txtTimer1.text = "0" |
| btnStartInfiniteTimer.setOnClickListener{ | |
| if (!isInfiniteTimerRunning){ | |
| infiniteTimer=Timer() | |
| isInfiniteTimerRunning = true | |
| infiniteTimer.scheduleAtFixedRate(object : TimerTask() { | |
| override fun run() { | |
| infiniteTimerTick() | |
| } | |
| }, 0, 1000) | |
| } |