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 TM; | |
use Composer\Package\Package; | |
use Composer\Script\Event; | |
/** | |
* Class MyClass | |
* |
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 TM\Website\Controller\Abstracts; | |
use Silex\Application; | |
/** | |
* Class BaseController | |
* | |
* @package TM\Website\Controller |
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
#!/usr/bin/env php | |
<?php | |
/** | |
* Add this file as "prepare-commit-msg" under /my-project/.git/hooks directory | |
* and make it executable. (chmod +x) | |
* | |
* Example: | |
* If Branchname was: "release/MYPRO-1-awesome-feature" | |
* and the commit message you typed in are: "Take this" |
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
#!/usr/bin/env bash | |
PHP=/usr/local/opt/php70/bin/php | |
ARGUMENTS="--ignore-platform-reqs --optimize-autoloader" | |
EXCLUDE_COMMANDS=(init selfupdate dumpautoload diagnose) | |
for item in "${EXCLUDE_COMMANDS[@]}"; do | |
if [[ $1 == "$item" ]]; then ARGUMENTS=""; fi | |
done | |
echo "Running composer with $($PHP -v)" |
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
#!/usr/bin/env bash | |
while read oldrev newrev refname | |
do | |
BRANCH=$(git rev-parse --symbolic --abbrev-ref $refname) | |
if [[ "$BRANCH" =~ ^hotfix/* ]]; then | |
echo " /===============================" | |
echo " | HOTFIX DETECTED ..." | |
GIT_WORK_TREE=/tmp git checkout master -f -q | |
GIT_WORK_TREE=/tmp git merge $BRANCH -q --comit -m "Merge $BRANCH" --no-ff |
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 | |
messages=("Encrypt / ... Waiting" "Create bitcoin ... Waiting" "Format disk ... Waiting" "Copy all emails ... Waiting" "Update passwords ... Waiting") | |
echo ${messages[$RANDOM % ${#messages[@]} ]} | |
sleep 2000 |
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 | |
require __DIR__ . '/../vendor/autoload.php'; | |
use Composer\Script\Event; | |
use Composer\IO\ConsoleIO; | |
use Symfony\Component\Console\Input\ArrayInput; | |
use Symfony\Component\Console\Output\ConsoleOutput; | |
use Symfony\Component\Console\Helper\HelperSet; | |
use Tooly\ScriptHandler; |
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] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; PHP's initialization file, generally called php.ini, is responsible for | |
; configuring many of the aspects of PHP's behavior. | |
; PHP attempts to find and load this configuration from a number of locations. | |
; The following is a summary of its search order: |
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 My\App; | |
class CacheWarmer | |
{ | |
private $cacheDirectory; | |
public function __construct(string $cacheDirectory) | |
{ |
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
package main | |
import ( | |
"context" | |
"log" | |
"cloud.google.com/go/pubsub" | |
) | |
func main() { |
OlderNewer