Skip to content

Instantly share code, notes, and snippets.

View crewstyle's full-sized avatar
💭
Good mood! Wanna try new tools for WordPress

Achraf Chouk crewstyle

💭
Good mood! Wanna try new tools for WordPress
View GitHub Profile
@garak
garak / list.html.twig
Last active July 18, 2020 05:50 — forked from tentacode/list.html.twig
Twig recursive macro
{% macro recursiveCategory(category) %}
{% import _self as self %}
<li>
<h4><a href="{{ path(category.route, category.routeParams) }}">{{ category }}</a></h4>
{% if category.children|length %}
<ul>
{% for child in category.children %}
{{ self.recursiveCategory(child) }}
{% endfor %}
@bartlomiejdanek
bartlomiejdanek / git-remove-file.sh
Created January 10, 2012 10:23
remove file from git history
#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2
if [ $# -eq 0 ]; then
exit 0