Skip to content

Instantly share code, notes, and snippets.

View vrcca's full-sized avatar
🌟

Vitor Cavalcanti vrcca

🌟
View GitHub Profile
@kyleVsteger
kyleVsteger / release.Dockerfile
Last active August 8, 2022 18:45
Multistage Elixir 1.11 Phoenix Live View Release Dockerfile
ARG ALPINE_VERSION=3.12.0
FROM hexpm/elixir:1.11.0-erlang-23.1.1-alpine-3.12.0 as builder
ARG APP_VSN="1.0.0"
# Replace `your_app` with your otp application name.
ENV APP_NAME=your_app \
APP_VSN=${APP_VSN} \
MIX_ENV=prod
@mugli
mugli / anmeldung-termin-notifier.sh
Last active February 8, 2023 19:55
Little bash script to repeatedly check if any appointment slot is available for Anmeldung (apartment registration) in Berlin
#!/bin/bash
# Check if xidell is present (required for extracting from webpage using xpath)
if ! command -v xidel &> /dev/null
then
printf "\n\nCould not find xidel \n\n"
echo "You can install it with (on a mac):"
echo "brew install xidel"
exit
fi
@katzefudder
katzefudder / Dockerfile
Last active December 6, 2022 07:44
AWS CLI dockerized with Alpine Linux
FROM alpine:3.14
ENV AWSCLI_VERSION "1.20.7"
RUN apk add --update \
python3 \
python3-dev \
py-pip \
build-base \
&& pip install awscli==$AWSCLI_VERSION --upgrade --user \
@pehunka
pehunka / gist:5d0eb97b23168a65bdb7
Last active December 12, 2019 09:22
Wildfly 8.x #oracle #jdbc
## Register driver
ARCHIVE_NAME=ojdbc6.jar
REPOSITORY_DIR=pathToDriver
SERVER_DIR=pathToWildfly
INSTALL_DIR=$SERVER_DIR/modules/system/layers/base/com/oracle/ojdbc6/main
SERVER_USER=petr
SERVER_PASSW=petr
mkdir -p $INSTALL_DIR
cp $REPOSITORY_DIR/$ARCHIVE_NAME $INSTALL_DIR
@jelies
jelies / CustomSchemaValidationConfiguration.java
Created February 12, 2014 08:33
Custom Hibernate schema validator that collects all the validation errors to display them all together instead of crashing one by one. Using Hibernate 3.6.4.
package com.jelies.hibernate.validation;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.TreeMap;
import org.apache.log4j.Logger;
import org.hibernate.HibernateException;
@artem-zinnatullin
artem-zinnatullin / MyApp.java
Last active January 15, 2023 13:04
If you need to set one font for all TextViews in android application you can use this solution. It will override ALL TextView's typefaces, includes action bar and other standard components, but EditText's password font won't be overriden.
public class MyApp extends Application {
@Override
public void onCreate() {
TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf
}
}