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/sh | |
mysql "$@" -AN <<'SQL' | |
SELECT CONCAT('CREATE USER ', QUOTE(user), '@', QUOTE(host), ' IDENTIFIED WITH ', QUOTE(plugin), ' AS ', QUOTE(authentication_string), ';') | |
FROM mysql.user WHERE user<>'' AND host<>'' | |
ORDER BY user, host | |
; | |
SQL |
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
const {BlobServiceClient, generateBlobSASQueryParameters} = require("@azure/storage-blob"); | |
require("dotenv").config(); | |
const connectionString = process.env.AZURE_TEST_CONNECTION_STRING; | |
const containerName = process.env.AZURE_TEST_CONTAINER; | |
// MAGIC VALUE, empty buffer causes errors/timeouts, non-empty buffer is copied | |
const content = Buffer.from(''); | |
async function getSignedUrl(blobClient){ |
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
import {Injectable, Logger, Module} from '@nestjs/common'; | |
import {NestFactory} from '@nestjs/core'; | |
import {NestExpressApplication} from '@nestjs/platform-express'; | |
@Injectable() | |
class TestService { | |
constructor(private readonly logger: Logger){ | |
this.logger.log("UP"); | |
} | |
} |
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 getPDO(): \PDO | |
{ | |
return new \PDO("mysql:dbname=solidsnake_dev;host=db", "solidsnake_dev", "solidsnake_dev", [ | |
PDO::ATTR_PERSISTENT => true, | |
]); | |
} | |
$pdo = getPDO(); | |
$pdo->exec('CREATE TEMPORARY TABLE temp_test (id INT NOT NULL PRIMARY KEY)'); |
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
In Validate.php line 105: | |
[InvalidArgumentException] | |
'connectionString' can't be NULL or empty. | |
Exception trace: | |
MicrosoftAzure\Storage\Common\Internal\Validate::notNullOrEmpty() at /vendor/microsoft/azure-storage/src/Common/Internal/ConnectionStringParser.php:78 | |
MicrosoftAzure\Storage\Common\Internal\ConnectionStringParser::parseConnectionString() at /vendor/microsoft/azure-storage/src/Common/Internal/ServiceSettings.php:86 | |
MicrosoftAzure\Storage\Common\Internal\ServiceSettings::parseAndValidateKeys() at /vendor/microsoft/azure-storage/src/Common/Internal/StorageServiceSettings.php:365 |
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
$ steam | |
Running Steam on debian 9 64-bit | |
STEAM_RUNTIME is enabled automatically | |
Pins up-to-date! | |
[2017-09-08 20:27:01] Startup - updater built Sep 6 2017 20:37:15 | |
Looks like steam didn't shutdown cleanly, scheduling immediate update check | |
[2017-09-08 20:27:01] Checking for update on startup | |
[2017-09-08 20:27:01] Checking for available updates... | |
[2017-09-08 20:27:02] Download skipped: /client/steam_client_ubuntu12 version 1504757234, installed version 1504757234 | |
[2017-09-08 20:27:02] Nothing to do |
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
rm: cannot remove '/home/krzysztofchrapka/.steam/steam': Is a directory | |
rm: cannot remove '/home/krzysztofchrapka/.steam/bin': Is a directory | |
Installing breakpad exception handler for appid(steam)/version(1504757234) | |
Installing breakpad exception handler for appid(steam)/version(1504757234) | |
Gtk-Message: Failed to load module "gail" | |
Gtk-Message: Failed to load module "atk-bridge" | |
(steam:4604): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita", | |
/usr/share/themes/Adwaita/gtk-2.0/main.rc:733: error: unexpected identifier `direction', expected character `}' |
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 | |
namespace OJezu\FormatResponseBundle\Annotation\Controller; | |
/** | |
* @Annotation | |
*/ | |
class FormatResponse | |
{ |
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
# delete remote merged branches | |
git branch -r --merged | grep origin | grep -v '>' | grep "^ origin/\(hotfix\|feature\|bugfix\)" | xargs -L1 | cut -d"/" -f 2- | xargs -r git push origin --delete | |
# delete local merged branches | |
git branch --merged | grep "^ \(hotfix\|feature\|bugfix\)" | xargs -L1 | xargs -r git branch -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
#convert leading 4-spaces to tabs | |
for i in $(seq 15); do | |
find . -! -path "*/.git/*" -! -path "*/bower_components/*" -type f -! -path "./img/*" -! -path "./_log/*" -! -path "./download/*" -! -path "./fonts/*" -exec sed -i "s/^\(\( \)*\)\( \)/\1\t/" \{\} \; | |
done | |
#remove trailing whitespace | |
find . -! -path "*/.git/*" -! -path "*/bower_components/*" -type f -! -path "./img/*" -! -path "./_log/*" -! -path "./download/*" -! -path "./fonts/*" -exec \ | |
sed -i "s/\(\t\| \)\+\$//" \{\} \; | |
#remove multiple empty lines |
NewerOlder