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
name: Elixir CI | |
on: push | |
jobs: | |
test: | |
runs-on: ubuntu-18.04 | |
services: | |
postgres: | |
image: postgres:11 |
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: '3.5' | |
services: | |
zabbix-server: | |
image: zabbix/zabbix-server-pgsql:centos-5.2-latest | |
ports: | |
- "10051:10051" | |
volumes: | |
- /etc/localtime:/etc/localtime:ro | |
- /etc/timezone:/etc/timezone:ro | |
- ./zbx_env/usr/lib/zabbix/alertscripts:/usr/lib/zabbix/alertscripts:ro |
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
### /etc/nginx/sites-enabled/default ### | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name mysite.com; | |
include /etc/nginx/xtra/server.conf; |
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
--- | |
- | |
hosts: remote_host | |
gather_facts: no | |
name: "Testing synchronize" | |
vars: | |
start_time: "{{ lookup('pipe','date') }}" | |
test_files: | |
- test1 | |
- test2 |
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 | |
$ch = curl_init('https://www.howsmyssl.com/a/check'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
$data = curl_exec($ch); | |
curl_close($ch); | |
$json = json_decode($data); | |
echo "<pre>TLS version: " . $json->tls_version . "</pre>\n"; |
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
cd "C:\Program Files\Docker Toolbox\kitematic" | |
set name=games | |
set DOCKER_CERT_PATH=C:\Users\dmitry\.docker\machine\machines\default | |
set DOCKER_HOST=tcp://192.168.99.100:2376 | |
set DOCKER_TLS_VERIFY=1 | |
docker start mariadb | |
docker rm -f %name%-redis | |
docker rm -f %name% | |
docker run -d --name %name%-redis redis | |
docker run -d -p 80:80 --name %name% --link %name%-redis:redis |
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 | |
# https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings | |
git add . -u | |
git commit -m "Saving files before refreshing line endings" | |
git rm --cached -r . | |
git reset --hard | |
git add . | |
git commit -m "Normalize all the line endings" |
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/sh | |
if git rev-parse --verify HEAD >/dev/null 2>&1 | |
then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
fi |
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 | |
firstCommit=$1 | |
secondCommit=$2 | |
if [[ -z $firstCommit || -z secondCommit ]]; then | |
echo "Usage: $0 first_commit_sha second_commit_sha" | |
fi | |
git archive --format=tar.gz -o changes.tgz "$secondCommit" $(git diff --name-only "$firstCommit") |
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 sort_array_by_key($params) | |
{ | |
$sort_orders = array('asc' => SORT_ASC, 'desc' => SORT_DESC); | |
$sort_order = $sort_orders[$params['order']]; | |
$field = $params['key']; | |
$array = $params['array']; | |
$field_array = array(); | |
foreach ($array as $key => $row) |
NewerOlder