This file contains hidden or 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
| git shortlog -sn --all |
This file contains hidden or 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
| # Generate 16 char random alphanumeric password | |
| openssl rand -base64 32 | tr -d /=+ | cut -c -16 |
This file contains hidden or 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
| # brew info openjdk | |
| # sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk | |
| javahome() { | |
| unset JAVA_HOME | |
| export JAVA_HOME=$(/usr/libexec/java_home -v "$1") | |
| } | |
| alias java8='javahome 1.8' | |
| alias java17='javahome 17' | |
| alias java18='javahome 18' |
This file contains hidden or 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 python3 | |
| def main(): | |
| csv = open("large.csv", "w") | |
| write_header(csv) | |
| for var1 in range(0, 10): | |
| for var2 in range(0, 300): | |
| write_records(csv, var1, var2) | |
| csv.close() |
This file contains hidden or 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
| alias redis-cli='docker run -it --name redis-cli --link redis:redis --network localtesting_default --rm redis sh -c '''exec redis-cli -h redis -p 6379'''' |
This file contains hidden or 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 | |
| apps=( | |
| "app1" | |
| "app2" | |
| ) | |
| for app in "${apps[@]}" | |
| do | |
| cf events ${app} | |
| done |
This file contains hidden or 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 | |
| branches=( | |
| "branch-1" | |
| "branch-2" | |
| ) | |
| for branch in "${branches[@]}" | |
| do | |
| echo git push origin origin/${branch}:refs/tags/${branch} | |
| git push origin origin/${branch}:refs/tags/${branch} |
This file contains hidden or 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 python3 | |
| def main(): | |
| sql = open("large.sql", "w") | |
| for var1 in range(0, 10): | |
| for var2 in range(0, 300): | |
| write_records(sql, var1, var2) | |
| sql.close() | |
| def write_records(sql, var1, var2): |
This file contains hidden or 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
| var moment = require('moment'); | |
| var isBusinessHours = function() { | |
| var now = moment().utcOffset(-5 * 60); // Eastern | |
| return (now.day() > 0 && now.day() < 6 && now.hour() > 8 && now.hour() < 18); | |
| }; |
This file contains hidden or 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 com.google.gson.Gson; | |
| import org.springframework.amqp.rabbit.connection.CachingConnectionFactory; | |
| import org.springframework.amqp.rabbit.connection.ConnectionFactory; | |
| import org.springframework.amqp.rabbit.core.RabbitTemplate; | |
| import org.springframework.messaging.Message; | |
| import org.springframework.messaging.support.GenericMessage; | |
| public class TestMessagePublisherUtil { |
NewerOlder