Skip to content

Instantly share code, notes, and snippets.

View m4scosta's full-sized avatar

Marcos Costa Pinto m4scosta

  • São José dos Campos, São Paulo
  • 15:47 (UTC -03:00)
View GitHub Profile
@vielhuber
vielhuber / script.sh
Last active July 13, 2024 02:21
PostgreSQL: Backup and restore export import pg_dump with password on command line #sql
# best practice: linux
nano ~/.pgpass
*:5432:*:username:password
chmod 0600 ~/.pgpass
# best practice: windows
edit %APPDATA%\postgresql\pgpass.conf
*:5432:*:username:password
# linux
@pete-otaqui
pete-otaqui / bumpversion.sh
Created December 2, 2012 11:08
Bump a software project's VERSION, add the CHANGES, and tag with GIT
#!/bin/bash
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3"
# this script will display the current version, automatically
# suggest a "minor" version update, and ask for input to use
# the suggestion, or a newly entered value.
/* Demonstrates the Goldbach's conjecture - Every even integer greater than 2 can be expressed as the sum of two primes
*
* author: Igor Hercowitz
*
* usage: java Goldbach <number>
* output: the sum of the primes list
*
* ex:
* > java Goldbach 100
* 100 can be writen as: [97+3, 89+11, 83+17, 71+29, 59+41, 53+47]