Skip to content

Instantly share code, notes, and snippets.

View pedro-stanaka's full-sized avatar

Pedro Tanaka pedro-stanaka

View GitHub Profile
# PostgreSQL Client Authentication Configuration File
# ===================================================
#
# Refer to the "Client Authentication" section in the PostgreSQL
# documentation for a complete description of this file. A short
# synopsis follows.
#
# This file controls: which hosts are allowed to connect, how clients
# are authenticated, which PostgreSQL user names they can use, which
# databases they can access. Records take one of these forms:
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# (The "=" is optional.) Whitespace may be used. Comments are introduced with
# "#" anywhere on a line. The complete list of parameter names and allowed
/usr/local/crawler-rio/logs/*.log {
rotate 7
daily
compress
missingok
nocreate
}
@pedro-stanaka
pedro-stanaka / post_insert.sql
Created December 12, 2014 19:03
Youtube Vide Tutorial - SQL INSERT
INSERT INTO `posts`(`id`, `title`, `body`, `created`, `modified`)
VALUES (1,'Just a title','Just a post', NOW(),NOW());
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pedro-stanaka
pedro-stanaka / useful_snippets.sh
Created February 5, 2015 14:17
Useful shell snippets/functions
#!/bin/bash
# Add tex root information to the beginning of each file in directory
for file in src/chapters/*; do; echo $file; echo '% !TEX root =../qualificacao.tex' | cat - $file > temp && mv -f temp $file && rm -f temp; done
@pedro-stanaka
pedro-stanaka / Thorfile.thor
Last active August 29, 2015 14:17
Compiling sass and coffee using Thor and Watchr gems...
ROOT = File.expand_path(File.dirname(__FILE__))
WEBROOT = File.expand_path("../", Dir.pwd)
PRODUCTION = false
COMPASS = true
class Convert < Thor
desc "sass", "converts and puts sass in webroot"
@pedro-stanaka
pedro-stanaka / bs-static-site.bash
Last active August 29, 2015 14:17
Bootstrap a new static site - Using Sass + Coffee + HTML5_BP
#!/bin/bash
####
# To use this script I'd recommend installing RVM
#####
# Check dependencies
command -v gem >/dev/null 2>&1 || { echo >&2 "I require rubygems but it's not installed. Aborting."; exit 1; }
command -v git >/dev/null 2>&1 || { echo >&2 "I require git but it's not installed. Aborting."; exit 1; }
#!/bin/bash
# If there is not a build folder, create it
[ ! -d "build" ] && mkdir build
# Write build files inside build folder
cmake . -B./build
# Build the project using 8 parallel threads
# Let the user input additional parameters like:
<?php
namespace App\Test\Fixture;
use Cake\TestSuite\Fixture\TestFixture;
/**
* SchoolsFixture
*
*/
class SchoolsFixture extends TestFixture