Skip to content

Instantly share code, notes, and snippets.

View Andarius's full-sized avatar

Julien Brayere Andarius

View GitHub Profile
@Andarius
Andarius / test.sql
Last active October 11, 2024 10:03
VACUUM (FULL, ANALYSE, VERBOSE ) entities;
REINDEX TABLE CONCURRENTLY entities;
VACUUM (FULL, ANALYSE, VERBOSE ) entity_roles;
REINDEX TABLE CONCURRENTLY entity_roles;
VACUUM (FULL, ANALYSE, VERBOSE ) entity_users;
REINDEX TABLE CONCURRENTLY entity_users;
VACUUM (FULL, ANALYSE, VERBOSE ) worksites;
REINDEX TABLE CONCURRENTLY worksites;
select count(*), 'entities' as source
@Andarius
Andarius / RectButtonRadius.tsx
Created September 7, 2021 09:34
RectButtonRadius using RNGH
import { Colors } from 'app/styles/common'
import React, { FC } from 'react'
import {
Platform,
Pressable,
StyleProp,
StyleSheet,
View,
ViewStyle
} from 'react-native'
@Andarius
Andarius / convert.sh
Last active July 31, 2020 10:21
Convert svg icons to png from command line
#!/bin/bash
convert(){
readonly FILENAME=`echo $1 | sed -r "s/.+\/(.+)\..+/\1/" | tr - _`
readonly SIZES=(
48 mdpi
72 hdpi
96 xhdpi
@Andarius
Andarius / backup.sh
Created July 22, 2020 12:36
Backup data
#!/bin/bash
# set -xe
readonly BACKUP_FOLDERS=( /mnt/data/Projects )
readonly TARGET=server:/folder
sync(){
rsync -avz --exclude={.git,build,.idea,__pycache__,node_modules,target} --rsync-path=/usr/bin/rsync $1 $2
}