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
image: node:14 | |
pipelines: | |
branches: | |
default: | |
- step: | |
name: build | |
script: | |
- apt-get update | |
- apt-get install -y python3-pip |
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 | |
### BEGIN INIT INFO | |
# Provides: automated-ebs-snapshots | |
# Required-Start: $local_fs $network $named $time $syslog | |
# Required-Stop: $local_fs $network $named $time $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Description: automated-ebs-snapshots | |
### END INIT INFO |
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
# .git/hooks/prepare-commit-msg | |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) | |
if [[ ! $BRANCH_NAME =~ ^MOODLE_ ]] ; then echo "$BRANCH_NAME " | cat - "$1" > "$1.tmp" && mv "$1.tmp" "$1"; 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
<?php | |
$e = new Exception(); | |
watchdog( | |
'my_module', | |
"Message %foo !trace", | |
array( | |
'%foo' => 'Basic message', | |
'!trace' => nl2br("\n" . $e->getTraceAsString()), | |
), |
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
drush php-eval 'global $timers; $hook = 'cron'; $return = array(); foreach (module_implements($hook) as $module) { $function = $module . '_' . $hook; print($function ." - "); timer_start($function); $result = call_user_func_array($function, array()); if (isset($result) && is_array($result)) { $return = array_merge_recursive($return, $result); } else if (isset($result)) { $return[] = $result; } timer_stop($function); print($timers[$function]['time'] ."\r\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
drush user-create adminuser --mail="[email protected]" --password="1234"; drush user-add-role "administrator" adminuser |
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 | |
$data = array( | |
'agency' => array( | |
'name' => 'a', | |
'moderator' => 'b' | |
) | |
); | |
$rules = new Symfony\Component\Validator\Constraints\Collection(array( |
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
# see http://drupal.org/node/593406 | |
drush pml --no-core --type=module --status=enabled --pipe | xargs drush -y dis | |
drush pml --no-core --type=module --status=disabled --pipe | xargs drush -y en |
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 | |
/** | |
* PHP Anonymous Object | |
*/ | |
class AnObj | |
{ | |
protected $methods = array(); | |
public function __construct(array $options) |
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 | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |