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
package main | |
import ( | |
"fmt" | |
"testing" | |
) | |
func TestOverlappingDate(t *testing.T) { | |
tests := []struct { | |
beginDateA string |
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 | |
// Symmetric Encription | |
$msg = "ola"; | |
$key = random_bytes(SODIUM_CRYPTO_SECRETBOX_KEYBYTES); | |
$nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES); | |
$cypher_text = sodium_crypto_secretbox($msg, $nonce, $key); | |
$plain_text = sodium_crypto_secretbox_open($cypher_text, $nonce, $key); |
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
let hashes = function () { | |
let _this = this; | |
let _SEPERATOR_KEY_VALUE = ":"; | |
let _SEPERATOR_PAIR = "|"; | |
this._OLD_HASHES = {}; |
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
103.115.42.179 - - [04/Jul/2019:13:40:43 +0100] "GET / 301 | |
103.115.42.179 - - [04/Jul/2019:13:40:43 +0100] "GET /robots.txt 301 | |
103.115.42.179 - - [04/Jul/2019:13:40:44 +0100] "POST /App2f2e3eb2.php 301 | |
103.115.42.179 - - [04/Jul/2019:13:40:44 +0100] "GET /webdav/ 301 | |
103.115.42.179 - - [04/Jul/2019:13:40:45 +0100] "GET /help.php 301 | |
103.115.42.179 - - [04/Jul/2019:13:40:45 +0100] "GET /java.php 301 | |
103.115.42.179 - - [04/Jul/2019:13:40:45 +0100] "GET /_query.php 301 | |
103.115.42.179 - - [04/Jul/2019:13:40:46 +0100] "GET /test.php 301 | |
103.115.42.179 - - [04/Jul/2019:13:40:46 +0100] "GET /db_cts.php 301 | |
103.115.42.179 - - [04/Jul/2019:13:40:47 +0100] "GET /db_pma.php 301 |
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
ssh -D 0.0.0.0:8888 user@remoteserver |
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
/** | |
* Usage: | |
* On the template, create the following html. | |
* <table class="table" data-table="dates" data-empty=".is-empty"><thead><tr><th data-key="Id"></th><th data-key="Media.0.LowRs|Media.0.HigRs" data-type="image"></tr></thead></table> | |
* <div class="is-empty" style="display:none;">The result was empty</div> | |
* | |
* Then, on the result of callback ajax request, call like TableResult('dates', result); Tadah!!! | |
* The rest is magic! | |
*/ | |
(function($) { |
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
#!/bin/bash | |
set -o errexit | |
# Disclaimer: This is not the most secure configuration possible. This script | |
# is intended only to be more secure than the default configuration. No | |
# promises are made about this script preventing your server from getting | |
# owned or your bike getting stolen. The bad guys are still out to get you. | |
# And running this script does not excuse you from writing secure application | |
# code! |
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 | |
package=$1 | |
if [[ -z "$package" ]]; then | |
echo "usage: $0 <package-name>" | |
exit 1 | |
fi | |
package_split=(${package//\// }) | |
package_name=${package_split[-1]} |
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 | |
function mail_utf8( | |
$to_name, | |
$to, | |
$from_name, | |
$from, | |
$reply = '', | |
$subject = '(No subject)', | |
$message = '' | |
) |
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
package main | |
import ( | |
"log" | |
"fmt" | |
"net/smtp" | |
"bufio" | |
"os" | |
"strings" | |
) |
NewerOlder