This file contains 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
/**** | |
Javascript equivalent of Microsoft Excel's NETWORKDAYS() function. | |
Calculate Working Days between two dates. | |
Optimized for performance. accepts String '12/18/1990' and new Date('12/18/1990') Object. | |
usage: | |
networkdays('12/18/1990','12/18/2016'); | |
networkdays(new Date(),'12/18/2016'); |
This file contains 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 | |
/** | |
* Get current Laravel active session from outside laravel instance. | |
* Tested Laravel 5.2 | |
* | |
* | |
*/ | |
function getLaravelUser() | |
{ | |
require __DIR__ . '\path\to\bootstrap\autoload.php'; |
This file contains 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 data= {var:"val"} | |
xhr = new XMLHttpRequest(); | |
xhr.open('POST', 'url'); | |
xhr.setRequestHeader('Content-Type', 'application/json'); | |
xhr.onload = function() { | |
if (xhr.status === 200){ | |
console.log(xhr.responseText); | |
}else if (xhr.status !== 200){ | |
console.log('Failed ' + xhr.status); |
This file contains 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
{ | |
"Version": "2008-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowPublicRead", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": "s3:*", |
This file contains 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
0-mail.com | |
0815.ru | |
0845.ru | |
0clickemail.com | |
0wnd.net | |
0wnd.org | |
10minutemail.com | |
10minutemail.net | |
12houremail.com | |
12minutemail.com |
This file contains 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
abuse | |
admin | |
all | |
billing | |
contact | |
everyone | |
ftp | |
jobs | |
list | |
marketing |
This file contains 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
exports.handler = (event, context, callback) => { | |
var AWS = require('aws-sdk'); | |
var s3 = new AWS.S3(); | |
var inputObj = event.queryStringParameters ? event.queryStringParameters : event; | |
var Bucket = inputObj.Bucket = inputObj.Bucket!==undefined ? inputObj.Bucket : null; | |
var Prefix = inputObj.Prefix = inputObj.Prefix!==undefined ? inputObj.Prefix : null; | |
var params = {Prefix,Bucket}; | |
s3.listObjects(params, function(err, data) { | |
if (err){ | |
callback({status:false,message:err},null); |
This file contains 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
cat access_log | awk '{print $8}' | sort -n | uniq -c | sort -nr | head -20 |
This file contains 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
# This gist mimics the supposed behavior of | |
# variable = merge(someListOfMaps[*].parameters...) | |
# or | |
# policy_parameters = merge(data.azurerm_policy_definition.d_policy_definitions[*].parameters...) | |
locals { | |
policy_parameters = [ | |
for key,value in data.azurerm_policy_definition.d_policy_definitions: | |
{ | |
parameters = jsondecode(value.parameters) |
This file contains 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
#!/usr/bin/env bash | |
#################################################################################### | |
# Slack Bash console script for sending messages. | |
#################################################################################### | |
# Installation | |
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack | |
# $ chmod +x /usr/bin/slack | |
#################################################################################### | |
# USAGE | |
# Send message to slack channel/user |
OlderNewer