Skip to content

Instantly share code, notes, and snippets.

View derhasi's full-sized avatar
💚
Life is green!

Johannes Haseitl derhasi

💚
Life is green!
  • Nuremberg, Germany
  • 09:20 (UTC +02:00)
View GitHub Profile
@derhasi
derhasi / Scripts.php
Created November 26, 2015 11:06
PoC for script update event
<?php
namespace DrupalComposer\DrupalProject;
use Composer\DependencyResolver\Operation\InstallOperation;
use Composer\DependencyResolver\Operation\UninstallOperation;
use Composer\DependencyResolver\Operation\UpdateOperation;
use Composer\Package\PackageInterface;
class Scripts {
# This is a command configuration to be used with https://github.com/derhasi/buddy
commands:
# calls the global composer command from the root folder
composer:
cmd: composer
workingDir: $DIR
# Calls a local drush command in ./vendor/bin/drush
drush:
cmd: drush
cmdDir: $DIR/vendor/bin
@derhasi
derhasi / SassMeister-input-HTML.html
Created September 8, 2015 14:01
Generated by SassMeister.com.
<div class="gallery">
<img src="http://i3.bstatic.de/sites/default/files/styles/gallery_large/public/gettyimages-478925238.jpg?itok=IqPfTVbU">
<!--<img src="http://i3.bstatic.de/sites/default/files/styles/gallery_large/public/ddpimages_05879631.jpg?itok=zai-mIxT">-->
</div>
@derhasi
derhasi / cmd.sh
Created September 2, 2015 14:00
Bulk delete tags
# git tag | grep build | while read -r TAGNAME; do echo "this is tag $TAGNAME"; done
# git push --delete origin $TAGNAME; git tag -d $TAGNAME
#
# Delete all tags containing a specified search term: e.g. "build" in this example
#
KEYWORD="build";
git tag | grep $KEYWORD | while read -r TAGNAME; do git push --delete origin $TAGNAME; git tag -d $TAGNAME; done
@derhasi
derhasi / build.sh
Created April 23, 2015 09:32
A build script for creating a build branch with all composer dependencies. Needs https://github.com/derhasi/staging
#!/usr/bin/env bash
########################################################################################################################
#
# BUILD SCRIPT
#
# Currently the build is triggered from the current branch!
#
# The build script builds a new branch from the current branch by installing all dependencies and allowing those
# dependencies to be checked in with using .build.gitignore.
{
"description": "Composer template for Drupal projects",
"repositories": [
{
"type": "package",
"package": {
"name": "custom/package",
"type": "metapackage",
"version": "1.0.0",
"require": {
@derhasi
derhasi / simple.patch
Created February 6, 2015 15:29
A simple patch file
diff --git a/test.txt b/test.txt
new file mode 100644
index 0000000..b8a55bf
--- /dev/null
+++ b/test.txt
@@ -0,0 +1 @@
+This is only a test file to test the patch.
{
"repositories": [
{
"type": "composer",
"url": "http://drupal-packagist.webflo.io/"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
{
"packages": {
"drupal/drupal": {
"7.32.0": {
"name": "drupal/drupal",
"type": "non-destructive-archive-installer",
"version": "7.32.0",
"dist": {
"url": "http://ftp.drupal.org/files/projects/drupal-7.32.zip",
"type": "zip"
@derhasi
derhasi / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console