Skip to content

Instantly share code, notes, and snippets.

View valb3r's full-sized avatar
🏠
Working from home

Valentyn Berezin valb3r

🏠
Working from home
View GitHub Profile
@mxalbert1996
mxalbert1996 / Scrollbar.kt
Last active October 24, 2025 08:06
Modifiers to draw scrollbars in Jetpack Compose
/*
* MIT License
*
* Copyright (c) 2022 Albert Chang
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
#!/bin/bash
## This gist contains instructions about cuda v11.2 and cudnn8.1 installation in Ubuntu 20.04 for Pytorch 1.8 & Tensorflow 2.7.0
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
@mrsasha
mrsasha / README.md
Created July 13, 2018 08:25
Jacoco setup for calculating kotlin test coverage (single module)

Jacoco setup for calculating kotlin test coverage (single module)

put the jacoco.gradle file below somewhere in your app repo (like scripts folder), and then add apply from: '../scripts/jacoco.gradle' to your module gradle file.

This will add additional gradle build tasks to your app, in the form of "testFlavourUnitTestCoverage" that you can run manually (e.g. testStagingDebugUnitTestCoverage) to generate the coverage.

You can edit def excludes definition to further exclude classes you don't want to generate the coverage for. If you have source in other folders beyond those specified in def coverageSourceDirs, add them.

This will generate both exec file used by external code quality analyzers (like Sonarqube), in the build/jacoco folder, and XML and HTML reports, in the build/reports/jacoco/flavourName folder.

@weiserr
weiserr / application.yml
Last active August 7, 2022 12:04
Let's Encrypt on Ubuntu for Spring-Boot applications
server:
port: 8443
ssl:
# this should match with the used ${DEST}
key-store: file:./keystore.p12
key-store-password: password
keyStoreType: PKCS12
keyAlias: tomcat
@slorber
slorber / gist:5082320
Created March 4, 2013 13:44
Basic extension / custom SpringBatch support for NewRelic
<?xml version="1.0" encoding="UTF-8"?>
<urn:extension xmlns:urn="newrelic-extension" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="newrelic-extension extension.xsd" name="Custom SpringBatch extension" version="1.0">
<urn:instrumentation metricPrefix="SpringBatch">
<urn:pointcut transactionStartPoint="true" ignoreTransaction="false" excludeFromTransactionTrace="false" metricNameFormat="Job execution">
<urn:className>org.springframework.batch.core.launch.support.SimpleJobLauncher</urn:className>
<urn:method>
<urn:name>run</urn:name>
<urn:parameters>