Skip to content

Instantly share code, notes, and snippets.

@fazni
fazni / gist:f5759fb6b3098026a7d404bc0e5af574
Created October 24, 2019 12:14 — forked from luisbosque/gist:5513fa88b5087434089d
Export to csv format the list of remote branches and their "owners"
for i in `git branch -a |grep remotes |awk '{print $1}' | cut -d"/" -f 3,4,5 |grep -v ^master$ |grep -v ^HEAD$`; do echo "`git log -1 --pretty=format:\"%an (%ae)\" origin/$i`|$i"; done |sort > /tmp/branches.csv
@fazni
fazni / README-Template.md
Created May 23, 2019 09:06 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@fazni
fazni / code-review-checklist.md
Created April 28, 2019 14:17 — forked from nerandell/code-review-checklist.md
PHP Code Review Guidelines

Make sure these boxes are checked before submitting/approving the PR

General

  • The code works
  • The code is easy to understand
  • Follows coding conventions
  • Names are simple and if possible short
  • Names are spelt correctly
  • Names contain units where applicable
  • There are no usages of magic numbers
@fazni
fazni / copy_content.mkd
Created April 19, 2019 16:16 — forked from appleboy/copy_content.mkd
Copy all branch from another repository?

Repository url

origin: https://github.com/appleboy/git-test
remote: https://github.com/appleboy/html5-template-engine

Copy all branch from another repository

@fazni
fazni / AddAnotherItem.php
Created December 2, 2018 15:06 — forked from leymannx/AddAnotherItem.php
Drupal 8 Ajax Form Add Item Example
<?php
/**
* @file
* Contains \Drupal\hello_world\Form\AddAnotherItem.
*/
namespace Drupal\hello_world\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
@fazni
fazni / drupal-PSA-003-check.sh
Created April 25, 2018 16:47 — forked from jerbob92/drupal-PSA-003-check.sh
Check whether Drupal 7.59 and 8.5.3 are released
#!/bin/sh
url="https://ftp.drupal.org/files/projects/drupal-7.59.zip";
if curl --output /dev/null --silent --head --fail "$url"; then
echo "URL exists: $url";
else
echo "URL does not exist: $url";
fi;
url="https://ftp.drupal.org/files/projects/drupal-8.5.3.zip";
@fazni
fazni / url.php
Created March 19, 2018 13:06 — forked from webflo/url.php
Create link with attributes in Drupal 8
<?php
$url = Url::fromRoute('node.add', array('node_type' => $content_type));
$url->setOption('query', \Drupal::destination()->getAsArray(),);
$link = [
'#type' => 'link',
'#title' => t('Add !content_type content', array('!content_type' => $content_type)),
'#url' => $url,
'#attributes' => [
@fazni
fazni / drupal8-links.php
Created February 8, 2018 14:56 — forked from colorfield/drupal8-links.php
Drupal 8 links, or where is my l() function
@fazni
fazni / README.md
Created November 29, 2017 14:25 — forked from WengerK/README.md
Drupal 8  —  Differences between Configuration API & State API

Article Ressources - Drupal 8  —  Differences between Configuration API & State API

This is the Gist repository for my article Drupal 8  —  Differences between Configuration API & State API.

Be aware that this article has been wrote for the Blog of Antistatique — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer.

Feel free to read it the full article on Medium or check it out on Antistatique.