Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Changing the world while working at @KanteronSystems

Pablo Hinojosa Pablohn26

💭
Changing the world while working at @KanteronSystems
View GitHub Profile
@RandomArray
RandomArray / urbackup-notes.txt
Created Nov 26, 2016
Installing UrBackup Client with and setting up common folders to backup
View urbackup-notes.txt
TF=`mktemp` && wget "https://hndl.urbackup.org/Client/2.0.36/UrBackup%20Client%20Linux%202.0.36.sh" -O $TF && sh $TF; rm $TF
urbackupclientctl add-backupdir -x -f -d /home
urbackupclientctl add-backupdir -x -f -d /root
urbackupclientctl add-backupdir -x -f -d /etc
urbackupclientctl add-backupdir -x -f -d /var
@toddlers
toddlers / Dockerfile
Created Jul 27, 2016
using envsubst in Dockerfile
View Dockerfile
FROM ubuntu:trusty
RUN \
apt-get update \
&& apt-get -y install gettext-base \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV VALUE=foo
ENV VALUE1=boo
COPY config.txt source_config.txt
View install-letsencrypt-in-jdk.sh
#!/bin/bash
set -e
JAVA_HOME=${1-text}
[ $# -eq 0 ] && { echo "Usage: sudo $0 \$(/usr/libexec/java_home -v '1.8*')" ; exit 1; }
KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts
wget https://letsencrypt.org/certs/letsencryptauthorityx1.der
wget https://letsencrypt.org/certs/letsencryptauthorityx2.der
@u0d7i
u0d7i / disable_vim_auto_visual_on_mouse.txt
Last active Apr 12, 2021
Disable vim automatic visual mode on mouse select
View disable_vim_auto_visual_on_mouse.txt
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a
@halberom
halberom / opt1_template.j2
Last active Mar 23, 2021
ansible - example of template if else
View opt1_template.j2
{# style 1 - long form #}
{% if filepath == '/var/opt/tomcat_1' %}
{% set tomcat_value = tomcat_1_value %}
{% else %}
{% set tomcat_value = tomcat_2_value %}
{% endif %}
{# style 2 - short form #}
{% set tomcat_value = tomcat_1_value if (filepath == '/var/opt/tomcat_1') else tomcat_2_value %}
View ffmpeg.md

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@simonmd
simonmd / Readme.md
Last active May 26, 2020
DICOM Widget for Dashing
View Readme.md

Description

Simple Dashing widget (and associated files) to display DICOM server checks.

##Dependencies

dicom

Add it to dashing's gemfile:

@josefglatz
josefglatz / gitlab-gmail-smtp-example.yml
Created Apr 7, 2015
Gitlab Gmail SMTP Configuration Google Apps
View gitlab-gmail-smtp-example.yml
# /etc/gitlab/gitlab.rb
gitlab_rails['gitlab_email_from'] = "support@owndomain.at"
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.gmail.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "account@owndomain.at"
gitlab_rails['smtp_password'] = "NicePassword"
gitlab_rails['smtp_domain'] = "owndomain.at"
gitlab_rails['smtp_authentication'] = :plain
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active Apr 6, 2021
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!
View whiteboardCleaner.md

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results