This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias aws-profile-chooser='x() { select prof in $( aws configure list-profiles ) ; do export AWS_PROFILE="$prof"; break; done }; x' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------- deploy stack | |
$ HOSTNAME=$(hostname) docker stack deploy -c docker-stack.yml prom | |
-------------------------------------------------------- lista stacks | |
$ docker stack ls | |
NAME SERVICES ORCHESTRATOR | |
prom 5 Swarm | |
-------------------------------------------------------- rimuovi uno stack | |
$ docker stack rm prom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" When started as "evim", evim.vim will already have done these settings. | |
if v:progname =~? "evim" | |
finish | |
endif | |
" Use Vim settings, rather then Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# split panes using | and - | |
bind | split-window -h | |
bind - split-window -v | |
unbind '"' | |
unbind % |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# refs - http://www.computerminds.co.uk/articles/rendering-drupal-7-fields-right-way | |
# refs - http://drupal.stackexchange.com/questions/25148/views-and-contextual-filters-with-entity-reference-field | |
======================================================== | |
$output = field_view_field('node', $node, 'field_name'); | |
======================================================== | |
That will return the sanitised, rendered field in its entirety, in the current language and in render-array form, so you'll get all the associated markup. | |
It will use the sites language fallback logic if the field has no values available for the current language. You can also pass an array of formatter options or specify a view mode as an optional argument. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>>>> drupal7 pack unpack bash scripts <<<<<<< | |
* drupal7-install.sh is only used to install first time, and set right permissions | |
* copy drupal7-pack.sh drupal7-unpack.sh under "sites/all/custom/pack" | |
- work on your site from the UI | |
* run drupal7-pack.sh to export your repo to code, then commit and push | |
- Into another direcotory: | |
* clone your repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
refs: http://drupal.org/node/642116 | |
refs: http://drupalovereasy.com/drupal-7/tutorials/installing-using-drush-make-git-profiles | |
refs: http://realize.be/exporting-more-configuration-drush-ctools-export-bonus | |
PACK: | |
# Starting from an up&running drupal site | |
#======================================== | |
cd <drupal_repo_root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
== LAUNCH NUnit FROM VS2012 =========================================== | |
TOOLS -> External Tool -> Add | |
Title: NUnit | |
Command: C:\path\to\nunit.exe | |
Arguments: $(TargetName)$(TargetExt) | |
Initial Directory: $(ProjectDir)\bin\Debug | |
TOOLS -> External Tool -> Add |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<Project xmlns="http://schemas.microsoft.com/project"> | |
<Name>Untitled</Name> | |
<Title>Untitled</Title> | |
<ScheduleFromStart>1</ScheduleFromStart> | |
<StartDate>2049-12-20T08:00:00</StartDate> | |
<FinishDate>2049-12-30T17:00:00</FinishDate> | |
<FYStartDate>1</FYStartDate> | |
<CriticalSlackLimit>0</CriticalSlackLimit> | |
<CurrencyDigits>2</CurrencyDigits> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source /etc/bash_completion.d/git | |
export GIT_PS1_SHOWDIRTYSTATE=1 | |
export GIT_PS1_SHOWSTASHSTATE=1 | |
export GIT_PS1_SHOWBRANCHREMOTE=1 | |
export GIT_PS1_SHOWUPSTREAM="verbose" | |
export PS1='\u@\h\[\e[1;32m\]$(__git_ps1 " %s")\[\e[m\] \w >' | |
NewerOlder