Skip to content

Instantly share code, notes, and snippets.

View frmichetti's full-sized avatar
🏠
Working from home

Felipe R Michetti frmichetti

🏠
Working from home
View GitHub Profile
@frmichetti
frmichetti / resume.md
Last active September 18, 2024 14:33
Currículo Desenvolvedor de Software
@crgimenes
crgimenes / main.go
Last active February 6, 2023 23:18
Web Scraping with Golang
package main
import (
"context"
"log"
"github.com/chromedp/chromedp"
)
func main() {
@niski84
niski84 / interfaceKeySearch.go
Created November 16, 2018 01:46
golang: Find key in interface (recursively) and return value as interface
// Find key in interface (recursively) and return value as interface
func Find(obj interface{}, key string) (interface{}, bool) {
//if the argument is not a map, ignore it
mobj, ok := obj.(map[string]interface{})
if !ok {
return nil, false
}
@kelvinst
kelvinst / create-ruby-gem.md
Last active July 19, 2024 14:20
Como criar uma gem ruby?

Como criar uma gem ruby?

Escolhi tratar sobre esse assunto hoje simplesmente porque foi uma das primeiras coisas que me perguntei "como eu faço isso?" no mundo ruby. Acredito que muita gente se pergunte a mesma coisa e espero que eu possa ajudar em algo para elas. 😀

O que é uma gem?

Bem, se você é um programador java, você chama sua gem de jar, se você é um programador C#, você chama de dll. Resumindo, é uma lib, uma biblioteca contendo códigos que você pode reaproveitar importando em outros projetos.

E usar gems no ruby é muito fácil, se você já deu uma brincada com rails por exemplo, é só você adicionar o código gem 'nome_da_gem' no arquivo Gemfile que está no root, depois executar o comando bundle install para baixar sua gem do repositório e pronto, só sair usando a biblioteca!

@nichtich
nichtich / README.md
Last active July 19, 2024 11:21 — forked from oodavid/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)
@IanVaughan
IanVaughan / uninstall_gems.sh
Created June 9, 2012 20:37
Uninstall all rbenv gems
#!/usr/bin/env bash
uninstall() {
list=`gem list --no-versions`
for gem in $list; do
gem uninstall $gem -aIx
done
gem list
gem install bundler
}