Skip to content

Instantly share code, notes, and snippets.

View gianlucacandiotti's full-sized avatar

Gianluca Candiotti gianlucacandiotti

  • Wolt
  • Helsinki, Finland
View GitHub Profile
@gianlucacandiotti
gianlucacandiotti / Basic default.pp
Last active August 29, 2015 14:21
Basic default.pp configuration.
# Requires nodejs, stdlib, apt and wget modules.
Exec { path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ] }
exec { 'apt-get update':
command => 'apt-get update',
timeout => 60,
tries => 3,
}
@gianlucacandiotti
gianlucacandiotti / Puppet Common Modules
Created May 22, 2015 17:29
Adding Puppet common modules as submodules.
git submodule add [email protected]:GianlucaCandiotti/puppet-nodejs.git vagrant-env/puppet/modules/nodejs
git submodule add [email protected]:GianlucaCandiotti/puppetlabs-stdlib.git vagrant-env/puppet/modules/stdlib
git submodule add [email protected]:GianlucaCandiotti/puppet-wget.git vagrant-env/puppet/modules/wget
git submodule add [email protected]:GianlucaCandiotti/puppetlabs-apt.git vagrant-env/puppet/modules/apt
@gianlucacandiotti
gianlucacandiotti / WP - ACF get related posts
Last active February 24, 2020 20:44
Get all post objects of a custom post type related to the current post. Advanced Custom Fields.
@gianlucacandiotti
gianlucacandiotti / WP - get custom post
Last active November 2, 2019 12:56
Get all posts for a custom post type and query them.
<?php
$type = 'custom_post_type';
$args = array(
'post_type' => $type,
'post_status' => 'publish',
'posts_per_page' => -1,
'ignore_sticky_posts'=> true
);
$my_query = null;
$my_query = new WP_Query($args);
@gianlucacandiotti
gianlucacandiotti / Untrack file git
Created April 6, 2015 14:29
Untrack a file from git without removing it from git cache.
git update-index --assume-unchanged [path]
@gianlucacandiotti
gianlucacandiotti / Git list commits
Last active August 24, 2017 00:25
List commits with a nice format
git log --pretty=format:"%h - %an, %ar : %s" --max-count=5