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
module.exports = function(grunt) { | |
// ... | |
grunt.initConfig({ | |
//... | |
// Deploy settings (task config, put inside grunt.initConfig) | |
rsync: { |
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
# Drush-Bash tricks 0.2 | |
# Copyright Nuvole 2010, Capi Etheriel 2012. | |
# License: GPL 3, see http://www.gnu.org/licenses/gpl.html | |
# For a quick start: copy this entire file to the end of the .bashrc | |
# file in your home directory and it will be enabled at your next | |
# login. See http://nuvole.org/node/26 for more details and options. | |
# Drupal and Drush aliases. | |
# To be added at the end of .bashrc. |
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
startup_message off | |
vbell off | |
autodetach on | |
#escape / | |
defscrollback 5000 | |
#caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= %c" | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}%{C}Screen: %{c}%{= kG}[%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{C} %d-%m %{W}%c %{g}]' |
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
#!/bin/bash | |
if [ ! -d './downloaded_tweets' ]; then | |
mkdir downloaded_tweets | |
if [ ! -d './downloaded_tweets' ]; then | |
echo "Can't create output dir." > /dev/stderr | |
exit 1 | |
fi | |
fi | |
cd downloaded_tweets |
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 focus="sudo sh -c \"echo '127.0.0.1 www.facebook.com twitter.com mail.google.com # aab6de513ab5de9359809f3cdb62d352' >> /etc/hosts\"" | |
alias unfocus='sudo sed -i "" "/aab6de513ab5de9359809f3cdb62d352/d" /etc/hosts' |
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
#! /bin/bash | |
# Set overridable filename format | |
: ${DRUPAL_DUMP_FORMAT:="%at-%h"} | |
filename="$( git log -n 1 --format=${DRUPAL_DUMP_FORMAT} ).sql" # see git help log for more on git formats | |
# Set overridable path | |
: ${DRUPAL_DUMP_PATH:="."} # path, relative to drupal root | |
path="$( cd `drush dd` ; realpath $DRUPAL_DUMP_PATH 2>&1 )" |
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
<?php | |
//se eu nao botar error_reporting = 0, ele vai mostrar a mensagem padrão do php mesmo assim =) | |
ini_set( 'error_reporting', 0 ); | |
register_shutdown_function('shutdown'); | |
function shutdown( ) | |
{ | |
$error = error_get_last(); | |
if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)) |
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
#!/bin/bash | |
# Shell script to backup MySql database (Performed for Drupal databases) | |
# It ignores drupal cache and temporary information common tables content, | |
# although it fits any mysql database dump. | |
# To backup a Mysql database file to a chosen directory you must provide the | |
# database name, and mysql access information through parameters in the script | |
# execution. | |
# Based on the original script on | |
# http://www.cyberciti.biz/nixcraft/vivek/blogger/2005/01/mysql-backup-script.html | |
# Last updated: May - 2013 |
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
CREATE SCHEMA liberated; | |
CREATE OR REPLACE FUNCTION public.liberate() | |
RETURNS boolean | |
LANGUAGE plv8 | |
AS $function$ | |
var tables = plv8.execute( | |
"select relname FROM pg_catalog.pg_class" | |
+ " c LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace" |
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
'use strict'; | |
var util = require('util'); | |
var stream = require('stream'); | |
var Writable = stream.Writable || require('readable-stream').Writable; | |
function dbConnect(connectionString) { | |
console.log('connectionString', | |
connectionString); | |
return { |
OlderNewer