This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o errexit | |
echo "Removing exited docker containers..." | |
docker ps -a -f status=exited -q | xargs -r docker rm -v | |
echo "Removing dangling images..." | |
docker images --no-trunc -q -f dangling=true | xargs -r docker rmi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/ | |
# GitLab uses docker in the background, so we need to specify the | |
# image versions. This is useful because we're freely to use | |
# multiple node versions to work with it. They come from the docker | |
# repo. | |
# Uses NodeJS V 9.4.0 | |
image: node:9.4.0 | |
# And to cache them as well. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// file: index.js | |
var _ = require("lodash"); | |
var express = require("express"); | |
var bodyParser = require("body-parser"); | |
var jwt = require('jsonwebtoken'); | |
var passport = require("passport"); | |
var passportJWT = require("passport-jwt"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'httparty' | |
fastlane_version "1.95.0" | |
default_platform :ios | |
before_all do | |
# put here your token and iOs scheme app | |
ENV["GITHUB_TOKEN"] = "---" | |
ENV["APPETIZE_TOKEN"] = "---" | |
ENV["APP_IOS_SCHEME"] = "---" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type Node struct { | |
Value int | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Os dados contidos nesse arquivo foram extraídos do site: http://ibge.gov.br/cidadesat utilizando ruby, nokogiri e expressões regulares. | |
-- Autor: Mauricio Natanael Ferreira | |
-- Github: https://github.com/manfe | |
-- Twitter: @manfe01 | |
-- Email: contato [at] ferreiramauricio [dot] com | |
-- *********************************************************************************************************************************************** | |
-- id ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2013, Cassiano Rabelo (http://www.cassianorabelo.com) | |
* | |
* Licensed under The MIT License | |
* Redistributions of files must retain the above copyright notice. | |
* | |
* @Copyright Copyright 2013, Cassiano Rabelo (http://www.cassianorabelo.com) | |
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) | |
* Date: 01/03/2013 | |
* Fonte: http://www.ibge.gov.br/cidadesat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PopulaEstadosCidades < ActiveRecord::Migration | |
def self.up | |
Estado.create(:sigla => 'AC', :nome => "Acre") do |e| | |
e.cidades.build(:nome => "Acrelândia") | |
e.cidades.build(:nome => "Assis Brasil") | |
e.cidades.build(:nome => "Brasiléia") | |
e.cidades.build(:nome => "Bujari") | |
e.cidades.build(:nome => "Capixaba") | |
e.cidades.build(:nome => "Cruzeiro do Sul") | |
e.cidades.build(:nome => "Epitaciolândia") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"estados": [ | |
{ | |
"sigla": "AC", | |
"nome": "Acre", | |
"cidades": [ | |
"Acrelândia", | |
"Assis Brasil", | |
"Brasiléia", | |
"Bujari", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# Brute-force way to retrieve all Github's repositories at once | |
# Usage: | |
# github_repos.rb clone # will clone all the user's repositories | |
# github_repos.rb clone test # will just clone 6 repositories for testing purposes | |
# github_repos.rb pull # will update all of the user's local repositories | |
# | |
# If you have forked repositories, the original sources will be added | |
# as remotes with the default 'forked_from' name, and a new 'forked_from' |
NewerOlder