Skip to content

Instantly share code, notes, and snippets.

View felipebhz's full-sized avatar
:-)

FelipeBHZ felipebhz

:-)
View GitHub Profile
@felipebhz
felipebhz / Purge MySQL from Mac OSX
Created April 21, 2019 18:56
Purge MySQL from Mac OSX
To uninstall MySQL and completely remove it (including all databases) from your Mac do the following:
Open a terminal window
Use mysqldump to backup your databases to text files!
Stop the database server
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
edit /etc/hostconfig and remove the line MYSQLCOM=-YES-
@felipebhz
felipebhz / README.md
Created February 13, 2019 02:53 — forked from nichtich/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)
@felipebhz
felipebhz / gist:bb4d244b316101126b3cd9bca08fe4d0
Created November 18, 2018 16:59
Contar Sequência de DNA
let arrDNA = ['A','G','C','T','T','T','T','C','A','T','T','C','T','G','A','C','T','G','C','A','A','C','G','G','G','C','A','A','T','A','T','G','T','C','T','C','T','G','T','G','T','G','G','A','T','T','A','A','A','A','A','A','A','G','A','G','T','G','T','C','T','G','A','T','A','G','C','A','G','C']
let letraA = 0;
let letraG = 0;
let letraC = 0;
let letraT = 0;
for(i=0;i<=arrDNA.length;i++){
switch(arrDNA[i]){
case "A":

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

@felipebhz
felipebhz / install_composer.txt
Last active February 3, 2018 22:15
Composer Install
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
mv composer.phar /usr/local/bin/composer