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
<!-- does not handle duplicates well, need to use hashing to fix that --> | |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>test</title> | |
<base href="/"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> |
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 invitations=0; | |
$(".mn-person-info").each(function(index, el){ | |
var occupation = $($(el).find(".mn-person-info__occupation--card-layout")).text() | |
expr = /(software|engineer|develop|recruit|web|programmer|phd|master|msc|ceo|cto|hr|hire|hiring)/i; // case insensitive | |
var shouldAdd = expr.test(occupation); | |
if(shouldAdd){ | |
console.log(occupation + " matches your filters "+expr); | |
$(el).parent().find("[data-control-name='invite']").click(); | |
console.log(invitations++); | |
} |
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
#!/bin/bash -ex | |
TIME=`gdate +%s%N` | |
function alert(){ | |
curl -XPOST 'https://api.opsgeni.us/v1/json/alert' -d ' | |
{ | |
"apiKey": "your-api-key-here", | |
"message" : "TEST ALERT '`echo $TIME`'" |
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 calc(){ | |
var players = [ | |
{ name: 'arif', score: 5 }, | |
{ name: 'alp', score: 8 }, | |
{ name: 'bahar', score: 6 }, | |
{ name: 'selcuk', score: 3 }, | |
{ name: 'ibrahim', score: 4 }, | |
{ name: 'caner', score: 3 }, | |
{ name: 'cagatay', score: 9 }, | |
{ name: 'furkan', score: 6 }, |
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 opsgenie = require("opsgenie-sdk"); | |
opsgenie.configure({ | |
'api_key': '0d3deae3-a362-4c79-b485-dfd1ad56947c', | |
'host': "http://127.0.0.1:9000" | |
}); | |
function waterfall(func, timeout, iterations, index){ | |
console.log(index); | |
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 hashKey = "id"; | |
var rangeKey = null; | |
var tableName = "alert"; | |
var scanParams = { | |
TableName: tableName, | |
}; | |
docClient.scan(scanParams, function(err, data) { | |
if (err) ppJson(err); // an error occurred |