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 -e | |
# -------------------------------------------------------- | |
# Generate app icons and xcassets file from a single image | |
# Ben Clayton, Calvium Ltd. | |
# https://gist.github.com/benvium/2be6d673aa9ac284bb8a | |
# -------------------------------------------------------- | |
# | |
# Usage with an input of 1024x1024 PNG file | |
# generateAppIcon.sh AppIcon.png |
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: '2' | |
services: | |
api: | |
volumes: | |
- "nfsmount:${CONTAINER_DIR}" | |
volumes: | |
nfsmount: | |
driver: local | |
driver_opts: |
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: brown; icon-glyph: file-code; | |
// To use this script, you need to configure an OAuth App on GitHub. | |
// Follow the instructions on the link below to create your OAuth App. | |
// | |
// When you are asked to put in a redirect URL, you should put the URL for running this script in Scriptable. Assuming the name of this script is "Create Gist", the URL is scriptable:///run?scriptName=Create%20Gist | |
// | |
// https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/ | |
// |
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 | |
final class RegisterRepositoriesForAllEntitiesPass implements CompilerPassInterface | |
{ | |
/** {@inheritdoc} */ | |
public function process(ContainerBuilder $container) | |
{ | |
/** @var MappingDriver $metadata */ | |
$metadata = $container->get($this->mappingDriverServiceName()); | |
$entityManagerReference = new Reference('doctrine.orm.entity_manager'); |
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
# Use it like this: | |
# | |
# $ printf $(_TITLE) "Something in green" "The message" | |
# | |
# This will output something like this: | |
# | |
# [Something in green] The message | |
# | |
# (of course, with proper colors) | |
_TITLE := "\033[32m[%s]\033[0m %s\n" # Green text |
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
/** Checks if the JWT is present and not expired | |
The token is expected to be found in `token` environment variable | |
*/ | |
function isValidToken() { | |
const token = pm.environment.get("token"); | |
if (!token) { | |
console.log("Token is missing"); | |
return false; | |
} | |
// Payload is retrieved after JSON parsing the base64 decoded `atob()` 2nd part of the JWT `[1]` |
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 | |
use App\Kernel; | |
require __DIR__.'/vendor/autoload_runtime.php'; | |
use Symfony\Component\Console\Output\StreamOutput; | |
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; |
OlderNewer