$mapperMock = $this->getMock('Doctor\Mapper\Calendar');
$mapperMock
->expects($this->once())
->method('getDoctorTimeSlots')
->will($this->returnValue([]))
;
$translator = $this->getMock('Zend\Translator');
$translator
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
alias java_ls='/usr/libexec/java_home -V 2>&1 | grep -E "\d.\d.\d_\d\d" | cut -d , -f 1 | colrm 1 4 | grep -v Home' | |
function java_use() { | |
export JAVA_HOME=$(/usr/libexec/java_home -v $1) | |
export PATH=$JAVA_HOME/bin:$PATH | |
java -version | |
} |
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 | |
curl -XPUT http://localhost:9200/_template/fastalert -d ' | |
{ | |
"template": "fastalert*", | |
"mappings": { | |
"fastalert": { | |
"properties": { | |
"@timestamp": { | |
"type": "date" |
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
input { | |
file { | |
path => "/opt/suricata/log/json-archives/*/*" | |
codec => json | |
type => "filejson" | |
start_position => "beginning" | |
sincedb_path => "/opt/suricata/sincedb/filejson.sincedb" | |
} | |
file { | |
path => "/opt/suricata/log/archives/*/*" |
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
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'bling/vim-airline' | |
Plugin 'nathanaelkane/vim-indent-guides' |
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 | |
####################################################################### | |
## | |
## START HEADER SCRIPT | |
## | |
####################################################################### | |
type realpath &>/dev/null | |
if [ $? -eq 1 ]; then |
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
server { | |
listen 80 default_server; | |
root /opt/html; | |
index index.php index.html; | |
rewrite_log on; | |
location / { | |
rewrite ^(/.*?\.php)(/.*)?$ /...$document_root/.../...$1/...$2 last; | |
} |
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
function n() { | |
var t = this; | |
t.yet = false; | |
t.done = function(cb) { | |
if (!t.yet) { | |
setTimeout(function(){t.done(cb)}, 1000); | |
} else { | |
cb(); | |
} | |
}; |
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
class Curl | |
{ | |
public function download($url, $header = null, $cookie = null, $post = null, $proxy = null) { | |
$agent = self::generate_useragent(); | |
$tor_address = '127.0.0.1:9050'; | |
$timeout = 300; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_HEADER, $header); |
OlderNewer