Skip to content

Instantly share code, notes, and snippets.

@techouse
techouse / timemachine_exclude_dev_dirs.sh
Last active August 6, 2023 12:57
Instruct Time Machine to exclude some development directories
#!/usr/bin/env bash
# This simple bash script is aimed at excluding some development specific directories.
#
# In this configuration it will instruct Time Machine to exclude directories named:
# - env
# - node_modules
# - vendor
# - venv
#
@roalcantara
roalcantara / cloud_firestore_security_rules_helper_functions.rules
Created March 9, 2018 01:46
Cloud Firestore Security Rules Helper Functions
service cloud.firestore {
match /databases/{database}/documents {
// USERS //
function isAuthenticated() {
return request.auth != null;
}
function userExists(uid) {
@h3nn3s
h3nn3s / gist:728113b0a81975bd5449
Last active June 12, 2018 09:11
TYPO3 Gridelements with FLUIDTEMPLATE (3 columns)
/*
* TypoScript
*/
# render headline
#tt_content.gridelements_pi1.10 = < lib.stdheader
tt_content.gridelements_pi1.20.10.setup {
1 < lib.gridelements.defaultGridSetup
1 {
cObject = FLUIDTEMPLATE
cObject {
@noelboss
noelboss / page_tsconfig.txt
Created November 21, 2013 14:18
How to configure gridelements for Typo3 purely with TypoScript and TSconfig and thus living in files. Based on this article: http://www.networkteam.com/blog/post/gridelements-professionell-nutzen.html
# Page TSConfig:
tx_gridelements.setup {
# ID of Element
1 {
title = Two Columns
config {
colCount = 2
rowCount = 1
rows {
1 {
@buryat
buryat / ring_bench.erl
Created January 6, 2012 12:47
erlang message pass through processes ring
-module(ring_bench).
-export([start/1]).
%% start([N, M])
%% Create N processes into ring and sned message round the ring M times
start([A, B]) ->
N = list_to_integer(atom_to_list(A)),
M = list_to_integer(atom_to_list(B)),
Self = self(),
@donatj
donatj / ColorCLI.php
Created October 26, 2011 03:34
Simple CLI color class
<?php
class ColorCLI {
static $foreground_colors = array(
'bold' => '1', 'dim' => '2',
'black' => '0;30', 'dark_gray' => '1;30',
'blue' => '0;34', 'light_blue' => '1;34',
'green' => '0;32', 'light_green' => '1;32',
'cyan' => '0;36', 'light_cyan' => '1;36',