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 -m | |
mkdir -p $HOME/.ngrok2 | |
CONFIG_FILE="$HOME/.ngrok2/curity.yml" | |
if [[ ! -e "$CONFIG_FILE" ]]; then | |
cat <<EOF > ${CONFIG_FILE} | |
console_ui: false | |
tunnels: |
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
private BigInteger f(int n, Map<Integer, BigInteger> cache) { | |
BigInteger result = cache.putIfAbsent(n, RESERVED); | |
if (result == null) { | |
int half = (n + 1) / 2; | |
CompletableFuture<BigInteger> completableFuture = new CompletableFuture<>(); | |
CompletableFuture<BigInteger> futureResult = CompletableFuture.supplyAsync(() -> f(half - 1, cache)); | |
futureResult.thenAcceptBothAsync(CompletableFuture.supplyAsync( |
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
$size = 0; | |
$count = 0; | |
$keyMarker = null; | |
$params = [ | |
'Bucket' => $bucket | |
]; | |
do { | |
$params['KeyMarker'] = $keyMarker; |
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 | |
/* | |
* Create an operation which will behave as the following | |
* set of functions (without using "if" statements): | |
* | |
* f(x) = 0, for x < 0; | |
* f(x) = x, for x >= 0 and x < 1; | |
* f(x) = 1, for x >= 1 and x < 2; | |
* f(x) = -x + 3, for x >=2 and x < 3; |
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
//courtesy of BoogieJack.com | |
function killCopy(e) { | |
return false; | |
} | |
function reEnable() { | |
return true; | |
} | |
document.onselectstart = new Function ("return false") |
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->getResponse()->clearHttpHeaders(); | |
$this->getResponse()->setStatusCode(200); | |
$this->getResponse()->setContentType('application/vnd.ms-excel'); | |
$this->getResponse()->setHttpHeader('Content-Disposition', "attachment; filename=filename.xls"); | |
$this->getResponse()->setHttpHeader('Content-Transfer-Encoding', 'binary'); | |
$this->getResponse()->setHttpHeader('Content-Length', $file_size); | |
return $this->renderText($file_contents); |