zsh
terminal
Add these lines in your ~/.bash_profile
file
# Show current git branch name
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
package main | |
import ( | |
"flag" | |
"github.com/streadway/amqp" | |
"log" | |
"time" | |
) | |
var amqpUri = flag.String("r", "amqp://guest:[email protected]/", "RabbitMQ URI") |
If you're on your phone, please request the 🖥 desktop site to star this gist 😇
I would talk about some myths on Jest & Enzyme. Moreover to stop the comparison of Jest and Enzyme. Instead would focus on how they can work together to test well your React Components. The talk would focus on "How Jest and Enzyme complement each other" and can help you test React components in a better way.
@SpringBootApplication | |
class Application | |
fun main(args: Array<String>) { | |
SpringApplication.run(Application::class.java, *args) | |
} | |
data class Greeting(val id: Long, val content: String) | |
@RestController |
# https://hakibenita.com/how-to-turn-django-admin-into-a-lightweight-dashboard | |
from django.contrib import admin | |
from django.db.models import Count, Sum, Min, Max, DateTimeField | |
from django.db.models.functions import Trunc | |
from . import models | |
def get_next_in_date_hierarchy(request, date_hierarchy): |
I implemented for my own use case - not fully tested - use at your own risk
This is how I improved performance of django-import-export
when importing a large set of new rows.