Skip to content

Instantly share code, notes, and snippets.

View DimitriHautot's full-sized avatar
😷

Dimitri Hautot DimitriHautot

😷
View GitHub Profile
@Nhoutain
Nhoutain / flow_update_status.sql
Last active September 2, 2021 08:06
Update flow schema based on public schema
DROP FUNCTION public.useful_flows();
DROP FUNCTION public.used_tenants();
DROP FUNCTION public.clean_useless_flows_data();
-- ----------------------------------------------------------------------
-- ----------------------------------------------------------------------
-- Clean all useless tables flows
CREATE OR REPLACE FUNCTION public.useless_flows()
RETURNS TABLE(table_access text) AS
$body$
package com.vaughndickson.elasticsearch
import groovy.util.logging.Slf4j
import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus
import org.elasticsearch.client.Client
import org.elasticsearch.client.transport.TransportClient
import org.elasticsearch.common.settings.ImmutableSettings
import org.elasticsearch.common.settings.Settings
import org.elasticsearch.common.transport.InetSocketTransportAddress
import org.springframework.beans.factory.DisposableBean
@SQiShER
SQiShER / docker_stats_with_names.sh
Last active May 5, 2020 07:35
Docker stats with Container Names instead of IDs
docker stats $(docker inspect -f '{{.Name}}' $(docker ps -q) | cut -c 2-)

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

Things to note
==============
No miracles:
* If you're already getting near the top end of what your ISP advertises then it's unlikely you can get any improvement.
* This only applies to ADSL, not Fibre/Cable
Improve poor connection speed due to noise from internal extension wiring
@dant3
dant3 / mvncolor.sh
Last active January 9, 2017 04:57 — forked from katta/mvncolor.sh
#!/usr/bin/env bash
# Formatting constants
BOLD=`tput bold`
UNDERLINE_ON=`tput smul`
UNDERLINE_OFF=`tput rmul`
TEXT_BLACK=`tput setaf 0`
TEXT_RED=`tput setaf 1`
TEXT_GREEN=`tput setaf 2`
TEXT_YELLOW=`tput setaf 3`
@trongthanh
trongthanh / gist:2779392
Last active April 24, 2024 23:46
How to move a folder from one repo to another and keep its commit history
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html
# First of all you need to have a clean clone of the source repository so we didn't screw the things up.
git clone git://server.com/my-repo1.git
# After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command
git filter-branch --subdirectory-filter your_dir -- -- all
# This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command.