mkdir -p certbot/certificates
mkdir certbot/logs
cd certbot
docker pull certbot/certbot && docker run --rm -it --name certbot \
require 'rubygems' | |
require 'restclient' | |
require 'nokogiri' | |
require 'json' | |
def call_url(url) | |
Thread.new do | |
puts "Chamando url #{url} no proxy #{RestClient.proxy}" | |
RestClient.get(url) rescue nil | |
end |
EMAIL_MKT_CHAVE = "[SUA_CHAVE]" | |
GOOGLE_EMAIL = "[SEU EMAIL NO GOOGLE]" | |
GOOGLE_PASSWD = "[SENHA GOOGLE]" | |
EMAIL_MKT_HOST = "[MAQUINA EMAIL MKT]" | |
EMAIL_MKT_LISTS = "11115" | |
EMAIL_MKT_LOGIN = "[LOGIN EMAIL MKT]" | |
EMAIL_MKT_URL = "http://#{EMAIL_MKT_HOST}.locaweb.com.br/admin/api/#{EMAIL_MKT_LOGIN}/contatos/importacao/?chave=#{EMAIL_MKT_CHAVE}&listas=#{EMAIL_MKT_LISTS}" | |
login = {:accountType => "HOSTED_OR_GOOGLE", | |
:Email => GOOGLE_EMAIL, |
;More information about what this program do at | |
;http://www.cs.brown.edu/courses/cs173/2008/Assignments/01-rinterp.html | |
#lang plai | |
; Binding type definition | |
(define-type Binding | |
[binding (name symbol?) (named-expr WAE?)]) | |
-module(polinomio). | |
-include_lib("eunit/include/eunit.hrl"). | |
-import(string, [concat/2]). | |
polinomio(C,E) -> [{C,E}]. | |
soma(L,[]) -> L; | |
soma([],L) -> L; | |
soma([{C1,E}|T1], [{C2,E}|T2]) -> [{C1 + C2, E}|soma(T1,T2)]; | |
soma([{C1,E1}|T1], [{C2,E2}|T2]) -> |
package pfc | |
private case class Term(coef: Double, exp: Int) { | |
require(coef != 0 && exp >= 0) | |
} | |
object Pol { | |
// conversao implicita de Double em Pol | |
implicit def doubleToPol(d: Double): Pol = Pol(d, 0) |
#count sources in a tomcat.log access file | |
head -n 2000000 localhost_access_log.2012-03-09.log | cut -f1 -d" " | sort | uniq -c | sort -k2nr | awk '{printf("%s %s \n",$1,$2)}END{print}' |sort -n |
# example, removing pm3, moving its dbroot to pm1 | |
# using google cloud | |
# run commands on pm1 server | |
ma stopsystem y | |
ma movePMDbrootConfig pm3 3 pm1 | |
ma removeModule pm3 | |
# now we shut down and destroy the removed module server, and attach its data disk to pm1 server |
#Example of how to completly remove a pm server and its dbroot | |
# pm server being removed: pm4 | |
# dbroot being removed: 4 | |
ma redistributeData start remove 4 | |
ma stopSystem y | |
ma unassignDBRootPMConfig 4 pm4 | |
ma removeModule pm4 y | |
ma startSystem | |
ma removeDBRoot 4 |
# bash | |
mkdir nova-pasta | |
npm init | |
npm install --save sequelize | |
npm install --save sequelize-cli | |
npm install --save sqlite3 | |
npm install --save mysql2 |