Skip to content

Instantly share code, notes, and snippets.

View gowthamgts's full-sized avatar
💭
It's not much, but it's honest work.

Gowtham gowthamgts

💭
It's not much, but it's honest work.
View GitHub Profile
@fideloper
fideloper / certbot.sh
Last active June 28, 2024 14:49
Certbot on Ubuntu, wildcard subdomains via CloudFlare DNS challenge
# Used on Ubuntu 18.04 and 20.04
# Find instructions for other OSes here: https://certbot.eff.org/instructions
# Install Certbot via Snaps
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
# Install DNS CloudFlare plugin
sudo snap set certbot trust-plugin-with-root=ok
@nuhkoca
nuhkoca / HiltDataBinding.kt
Last active February 26, 2024 16:33
A demonstration about how to inject BindingAdapters with Dagger Hilt.
BindingScoped.kt
@Scope
@Retention(AnnotationRetention.BINARY)
annotation class BindingScoped
-------------------------------------------------------
CustomBindingComponent.kt
@liemle3893
liemle3893 / .gitlab-ci.yml
Created April 1, 2020 12:27
Gitlab CI with Nomad
# Disable the Gradle daemon for Continuous Integration servers as correctness
# is usually a priority over speed in CI environments. Using a fresh
# runtime for each build is more reliable since the runtime is completely
# isolated from any previous builds.
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
DOCKER_TLS_CERTDIR: ""
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
@jamesmacfie
jamesmacfie / README.md
Created October 22, 2019 02:53
iTerm 2 - script to change theme depending on Mac OS dark mode

How to use

In iTerm2, in the menu bar go to Scripts > Manage > New Python Script

Select Basic. Select Long-Running Daemon

Give the script a decent name (I chose auto_dark_mode.py)

Save and open the script in your editor of choice.

@jivimberg
jivimberg / CoroutinesUtils.kt
Last active October 11, 2023 00:16
SQS Consumer using Kotlin coroutines and pool of workers.
package com.jivimberg.sqs.published
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.isActive
import kotlinx.coroutines.yield
import java.lang.Thread.currentThread
suspend fun CoroutineScope.repeatUntilCancelled(block: suspend () -> Unit) {
while (isActive) {
@zhunik
zhunik / docker-compose.yml
Created September 14, 2018 15:12
docker-compose Postgres health-check
version: "3"
services:
postgress:
....
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
app:
@SoulSu
SoulSu / aesecb.go
Last active August 3, 2022 07:36
golang aes ecb pKCS5Padding like java 3DES_ECB_PKCS5Padding
package idcardocr
import (
"bytes"
"crypto/cipher"
"crypto/des"
)
// 3DES加密
@hitautodestruct
hitautodestruct / reset.md
Created July 17, 2018 12:58
Reset root password on scaleway.com
@koladilip
koladilip / policy.json
Last active April 3, 2020 09:39
Cognito Identity Pool Authenticated Role Policy to Upload to S3 bucket
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject"
@primaryobjects
primaryobjects / css-comparison.csv
Last active June 26, 2024 17:18
A comparison of CSS library sizes.
Name Version Size (uncompressed) Size (minified) Size (gzipped) URL
Bootstrap v3.3.7 143 KB 117 KB 20 KB http://getbootstrap.com/css/
Bootstrap v4.0.0 187 KB 147 KB 20 KB https://v4-alpha.getbootstrap.com/
Materialize v3.0 114 KB 90 KB 18 KB http://materializecss.com/
Material Design Lite v1.3.0 350 KB 137 KB 21 KB https://getmdl.io/
mini.css v2.1 47 KB 36 KB 7 KB https://chalarangelo.github.io/mini.css/
Semantic UI v2.2.6 730 KB 550 KB 95 KB https://semantic-ui.com/
Foundation v3.0 90 KB 64 KB 12 KB http://foundation.zurb.com/
Pure CSS v0.6.2 80 KB 17 KB 3.8 KB https://purecss.io/
Picnic CSS v6.3.2 55 KB 38 KB 7 KB https://picnicss.com