Skip to content

Instantly share code, notes, and snippets.

View sam016's full-sized avatar
🎯
Focusing

sam016

🎯
Focusing
View GitHub Profile
@sam016
sam016 / bits_operation.h
Created April 8, 2018 16:35 — forked from leonid-ed/bits_operation.h
Macros for bit's manipulation: get bit, set bit, reset bit.
#define GET_BIT(X,N) ( ( (X) >> (N) ) & 1 )
#define SET_BIT(X,N) ( (X) | (1 << (N) ) )
#define RST_BIT(X,N) ( (X) & ~(1 << (N) ) )
@sam016
sam016 / gist:269f4474abef66f90615bc5112a8f512
Created November 1, 2017 18:23 — forked from anildigital/gist:862675ec1b7bccabc311
Remove dangling docker images
docker rmi $(docker images -q -f dangling=true)
@sam016
sam016 / breadcrump.twig
Last active January 13, 2017 17:03 — forked from mortendk/breadcrump.twig
twig breadcrumbs
{#
/**
* @file
* Returns HTML for a breadcrumb trail.
*
* @param $variables
* An associative array containing:
* - breadcrumb: An array containing the breadcrumb links.
*
* @ingroup themeable