This file contains hidden or 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 | |
UPTIMEROBOT_TOKEN="uptimerobot-token-here" | |
OHDEAR_TOKEN="ohdear-token-here" | |
OHDEAR_TEAM_ID=123456789 | |
OFFSET=0 | |
LIMIT=50 | |
TOTAL=1000000 |
This file contains hidden or 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 | |
# Download and install bitwarden CLI: https://help.bitwarden.com/article/cli/ | |
# First login to access your vault: | |
# $ bw login | |
# Export the session variable as explained in the login output: | |
# export BW_SESSION="..." | |
for row in $(bw list items --organizationid null | jq -r '.[] | @base64'); do | |
row=$(echo "$row" | base64 -d -) |
This file contains hidden or 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 | |
# Download and install bitwarden CLI: https://help.bitwarden.com/article/cli/ | |
# First login to access your vault: | |
# $ bw login | |
# Export the session variable as explained in the login output: | |
# export BW_SESSION="..." | |
# Get personal folder ID with: | |
# $ bw list folders | |
# Change personal folder id below |
This file contains hidden or 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
.PHONY: * | |
docker := $(shell if [ `pwd` != "/app" ]; then echo 'docker-compose exec php'; fi;) | |
fix-cs: | |
${docker} ./vendor/bin/php-cs-fixer fix | |
analyse: | |
${docker} ./vendor/bin/php-cs-fixer fix --diff --dry-run | |
${docker} ./vendor/bin/phpstan analyse |
This file contains hidden or 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 eachWithIdx(iterable, f) { var i = iterable.iterator(); var idx = 0; while (i.hasNext()) f(i.next(), idx++); } | |
function mapEach(iterable, f) { var vs = []; eachWithIdx(iterable, function (i) { vs.push(f(i));}); return vs; } | |
function output() { for (var i = 0; i < arguments.length; i++) { OUT.append(arguments[i]); } } | |
var rows = []; | |
eachWithIdx(ROWS, function (row) { | |
var obj = {}; | |
eachWithIdx(COLUMNS, function (col) { | |
var value = FORMATTER.format(row, col); |
This file contains hidden or 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 | |
// This file is not a CODE, it makes no sense and won't run or validate | |
// Its AST serves IDE as DATA source to make advanced type inference decisions. | |
namespace PHPSTORM_META { | |
$STATIC_METHOD_TYPES = [ | |
\Zend\ServiceManager\ServiceLocatorInterface::get('') => [ | |
// STATIC call key to make static (1) & dynamic (2) calls work | |
"special" instanceof \Exception, | |
// "KEY" instanceof Class maps KEY to Class |
This file contains hidden or 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 () { | |
var app = document.getElementById('Application'), | |
url = document.getElementById('URL'), | |
name = document.getElementById('Name'), | |
server = document.getElementById('Server'); | |
app.setAttribute('originalWidth', '0'); | |
app.style.width = '0px'; | |
url.setAttribute('originalWidth', '5%'); |
This file contains hidden or 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 | |
$psqlDelimiter = '|'; | |
$outputDelimiter = ';'; | |
$file = new SplFileObject(__DIR__ . '/psql.csv'); | |
$output = new SplFileObject(__DIR__ . '/output.csv', 'w'); | |
$i = 0; | |
while (!$file->eof()) { |
This file contains hidden or 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 | |
class ValidationFlow | |
{ | |
/** | |
* @var ValidationStep[] | |
*/ | |
private $steps = []; | |
/** |
This file contains hidden or 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
git log v1.0.0..v1.1.0 --pretty=oneline | grep -oE "PRJ-[0-9]+" | sort | uniq | xargs | sed 's/ /,/g' |
NewerOlder