π΅
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.startLiking = true | |
function getRandomArbitrary(min, max) { | |
return Math.random() * (max - min) + min; | |
} | |
function getRandomTime(min, max) { | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
copy the following script in the browser on tinder page. | |
and then run the following method. | |
$ start(300) | |
*/ | |
function likeIt () { | |
document.querySelectorAll('button[aria-label="Like"]')[0].click() | |
} | |
function start (likeTime = 1000) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const routeMap = [ | |
{ from: "A", to: "B", cost: 1 }, | |
{ from: "A", to: "C", cost: 4 }, | |
{ from: "A", to: "D", cost: 10 }, | |
{ from: "B", to: "E", cost: 3 }, | |
{ from: "C", to: "D", cost: 4 }, | |
{ from: "C", to: "F", cost: 2 }, | |
{ from: "D", to: "E", cost: 1 }, | |
{ from: "E", to: "B", cost: 3 }, | |
{ from: "E", to: "A", cost: 2 }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function objectDiff (object, newObject, exclude) { | |
const result = {} | |
if (!exclude) { | |
exclude = [] | |
} | |
for (const prop in newObject) { | |
if (newObject.hasOwnProperty(prop) && prop != '__proto__' && exclude.indexOf(newObject[prop]) == -1) { | |
if ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getRandomIntInclusive (min, max) { | |
min = Math.ceil(min) | |
max = Math.floor(max) | |
return Math.floor(Math.random() * (max - min + 1)) + min | |
} | |
async function codeGenerator (input) { | |
const inputLengthLimit = 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Validate brackets | |
* write a function that accepts a string and validates braces/brackets/parentheses | |
* β(β, β{β, β[β are openers | |
* β)β, β}β, β]β closers | |
* β{ [ }β should return false | |
* β{ [ ] ( ) }β should return true | |
**/ | |
const signMap = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var exec = require('child_process').exec; | |
var cmakeCommand = "mkdir -p build; cd build; cmake ..;"; | |
var cleanCommand = "rm -rf build"; | |
var testCommand = "cd build; ctest -V"; | |
//"cmake --build ." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Products items | |
[ | |
"id" => 1, | |
"name" => "test" | |
"price" => 30 | |
], | |
[ | |
"id" => 2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileDescriptor; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.PrintStream; | |
public class HelloWorld{ | |
private static HelloWorld instance; | |
public static void main(String[] args){ | |
instantiateHelloWorldMainClassAndRun(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { | |
Component, | |
} from 'react'; | |
import { | |
StyleSheet, | |
Text, | |
View, | |
Animated, | |
Easing, |