Skip to content

Instantly share code, notes, and snippets.

View rodrigoSyscop's full-sized avatar
🇧🇷
¯\_(ツ)_/¯

Rodrigo Vieira rodrigoSyscop

🇧🇷
¯\_(ツ)_/¯
  • Curitiba - PR
View GitHub Profile
@rodrigoSyscop
rodrigoSyscop / postgres-cheatsheet.md
Created January 24, 2017 00:37 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

If run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).

Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*

@rodrigoSyscop
rodrigoSyscop / searchForBackups.yml
Last active April 23, 2017 20:51
Search for bkpus in multiple servers, if found put on the list.
---
# first play just check for backups
- hosts: srvA srvB srvC srvD
gather_facts: no
vars:
file: '/etc/not-sync.txt'
vars_prompt:
- name: 'client'
prompt: 'CLIENT'
private: no
Verifying that "rodrigovieira.id" is my Blockstack ID. https://onename.com/rodrigovieira
history = []
def happy(number):
next_ = sum(int(n) ** 2 for n in str(number))
# stop condition
if next_ == 1:
return True
#!/bin/bash
#install GATK: https://software.broadinstitute.org/gatk/guide/quickstart
#install Picard: https://broadinstitute.github.io/picard/ , https://github.com/broadinstitute/picard/releases/tag/2.8.1
project=PVE_Eichh
prefix=/ohta/nicolay.cunha/all_samples_epan
picard=/ohta/nicolay.cunha/apps/picard.jar
gatk=/ohta/nicolay.cunha/apps/gatk/gatk.jar
names=/ohta/nicolay.cunha/all_samples_epan/names1
def filter(**lookup):
for k, v in lookup:
print(k.split('__'), v)
@rodrigoSyscop
rodrigoSyscop / docker-compose.yml
Last active November 19, 2017 01:48
Ambiente de desenvolvimento Docker com Docker Compose
version: "3"
services:
# Web service layer
nginx:
image: nginx:1.13
volumes:
- "./app:/var/www/html"
- "./nginx/nginx.conf:/etc/nginx/nginx.conf"
ports:
- "80:80"
@rodrigoSyscop
rodrigoSyscop / blog_2017-11-18.sql
Created November 19, 2017 02:19
dockerarticle initial db
CREATE DATABASE `blog`;
USE `blog`;
# Dump of table posts
# ------------------------------------------------------------
DROP TABLE IF EXISTS `posts`;
CREATE TABLE `posts` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
@rodrigoSyscop
rodrigoSyscop / index.php
Last active February 17, 2018 13:07
framework/index.php
<?php
// framework/index.php
$input = $_GET['name'];
printf('Hello %s', $input);
@rodrigoSyscop
rodrigoSyscop / index.php
Last active February 17, 2018 13:08
framework/index.php
<?php
// framework/index.php
$input = isset($_GET['name']) ? $_GET['name'] : 'World';
printf("Hello %s", $input);