Skip to content

Instantly share code, notes, and snippets.

View SolidShake's full-sized avatar
🦆
Quack!

Utkin Artem SolidShake

🦆
Quack!
View GitHub Profile
package main
import (
"fmt"
"github.com/jasonlvhit/gocron"
)
func main() {
go func() {
@SolidShake
SolidShake / shortWord.js
Created October 25, 2016 11:08
How to find shortest word in string (only with spaces)
function findShort(s){
return Math.min.apply(null, s.split(' ').map(w => w.length));
}
@SolidShake
SolidShake / intersection.js
Last active December 11, 2015 18:56
This method returns -1 if the value to search for never occurs.
Array.prototype.remove_ = (integer_list, values_list) => integer_list.filter(v => values_list.indexOf(v) == -1);
@SolidShake
SolidShake / gist:ed91694c647a998909ed
Created November 15, 2015 12:45 — forked from pavelbinar/gist:6333285
JavaScript: Random Boolean
/* Random Boolean */
var randomNumber = Math.random() >= 0.5;
console.log(randomNumber);
@SolidShake
SolidShake / fibonacci.js
Created November 15, 2015 11:57
Simple calculation of Fibonacci numbers
data = [1, 1];
for (var i = 2; i < 11; i++) {
data.push(data[i-1] + data[i-2]);
console.log(data);
}