- Create a directory for project
- Copy
docker-compose.yml
- Create
/extensions
in project directory. - Run
docker-compose up -d
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
public class Calculadora { | |
private static final Prova _ = of(Prova.class); | |
public double mediaDeProvas(List<Prova> provas) { | |
return mediaPonderada(provas, function(_.getNota()), function(_.getPeso())); | |
} | |
public <T> double mediaPonderada(List<T> lista, Function<T, Double> valor, Function<T, Double> peso) { | |
double soma = 0.0; | |
double somaPesos = 0.0; |
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
'use strict' | |
const AWS = require('aws-sdk'); | |
var MongoClient = require('mongodb').MongoClient; | |
let atlas_connection_uri; | |
exports.handler = (event, context, callback) => { | |
var uri = process.env['MONGODB_ATLAS_CLUSTER_URI']; | |
if (atlas_connection_uri != null) { |
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
import java.nio.ByteBuffer; | |
import java.nio.charset.Charset; | |
... | |
/** | |
Method Usage | |
ByteBuffer bf = string2ByteBuffer("test", Charset.forName("UTF-8")); | |
**/ |
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 br.com.syspdv.nfe.utils; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.net.URL; | |
import java.security.Security; | |
import javax.xml.soap.MessageFactory; | |
import javax.xml.soap.MimeHeaders; | |
import javax.xml.soap.SOAPConnection; |
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 com.endource.aws | |
import com.amazonaws.services.sqs.AmazonSQSAsync | |
import com.amazonaws.services.sqs.model.Message | |
import com.amazonaws.services.sqs.model.MessageAttributeValue | |
import org.slf4j.Logger | |
import org.slf4j.LoggerFactory | |
import org.springframework.beans.factory.annotation.Autowired | |
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty | |
import org.springframework.cloud.aws.messaging.config.SimpleMessageListenerContainerFactory |
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
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k | |
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf | |
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf | |
mkdir ~/.local/share/fonts/ | |
mv PowerlineSymbols.otf ~/.local/share/fonts/ | |
fc-cache -vf ~/.local/share/fonts/ | |
mkdir ~/.config/fontconfig/conf.d/ | |
mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/ | |
echo "Log out of your session and login again." |
These are instructions for setting up git to authenticate with GitHub when you have 2-factor authentication set up. This authentication should be inherited by any GUI client you are using. These are intentionally brief instructions, with links to more detail in the appropriate places.
-
Download and install the git command-line client (if required).
-
Open the git bash window and introduce yourself to git (if required):
git config --global user.name 'Firstname Lastname' git config --global user.email 'firstname.lastname@gov.bc.ca'
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
(* | |
* New-iTerm-Window.scpt | |
* | |
* Intended for use with QuickSilver | |
* I mapped option-y to running this script to create | |
* a new iTerm window on the current workspace | |
* | |
* Based on much Googling - very little "original" code here | |
* Comments/Suggestions to brad.lhotsky@gmail.com | |
*) |
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
# NOTE | |
# | |
# | |
# Use sed on the instance up to replace the INSTANCE_ID and DNS_RESOLVER with the following commands | |
# | |
#################################################################################################### | |
# Fetch the private IP for resolving DNS dynamically in nginx | |
# We also need to escape the `.` from it for usage in later sed | |
# | |
# DNS_RESOLVER=`grep nameserver /etc/resolv.conf | cut -d " " -f2 | sed 's/\./\\./g'` |