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
https://github.com/brave/brave-browser/issues/824#issuecomment-501191952 | |
document.getElementsByTagName('video')[0].requestPictureInPicture(); |
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
# TOMCAT | |
docker run -v {absolute_path}/{war_package}.war:/usr/local/tomcat/webapps/{name_of_package}.war -it -p 8080:8080 tomcat | |
# Path to resources | |
http://localhost:8080/{name_of_package} |
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 (c) 2015, Brad Conte (http://bradconte.com) | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are met: | |
// * Redistributions of source code must retain the above copyright | |
// notice, this list of conditions and the following disclaimer. | |
// * Redistributions in binary form must reproduce the above copyright | |
// notice, this list of conditions and the following disclaimer in the | |
// documentation and/or other materials provided with the distribution. |
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
caso de falha | |
mvn release:prepare | |
- voltar branch para commit anterior ao command | |
- força a atulização 'git push -f' | |
- apagar a tag local | |
- tag -d [nome da tag] | |
- apagar o arquivo 'release.prepare' |
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
# producer | |
bin/kafka-console-producer.sh --broker-list localhost:9092 --topic [topic name] --property "parse.key=true" --property "key.separator=:" | |
# consumer | |
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic [topic name] --from-beginning |
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
mvn versions:set -DnewVersion=[new version] -DgenerateBackupPoms=false |
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 static string TruncateAtWord(this string input, int length) | |
{ | |
if (input == null || input.Length < length) | |
return input; | |
int iNextSpace = input.LastIndexOf(" ", length); | |
return string.Format("{0}...", input.Substring(0, (iNextSpace > 0) ? iNextSpace : length).Trim()); | |
} | |
http://stackoverflow.com/a/1614090 |