View create_thumbnail.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# requires wkhtmltopdf | |
for pdf in *pdf; do | |
filename=$( basename -- "$pdf" ) | |
filename="${filename%.*}" | |
if [ ! -f "./$filename.jpg" ] | |
then | |
convert $pdf $filename.jpg |
View RetreiveTables.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.sql.Connection | |
import java.sql.DatabaseMetaData | |
import java.sql.DriverManager | |
def mysql_connection_string = 'jdbc:mysql://toto.com/tata_db' | |
// If you are on dev you can disable ssl certificate verification | |
def sqlserver_connection_string = 'jdbc:sqlserver://42.42.42.42:1433;databaseName=tata_db;useSSL=false;integratedSecurity=false;encrypt=true;trustServerCertificate=true' | |
Connection con = DriverManager.getConnection(sqlserver_connection_string, 'John', 'Doe') |
View RomanToArabic.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RomanConverter { | |
final static def VALUES = [ | |
'I': 1, | |
'V': 5, | |
'X': 10, | |
'L': 50, | |
'C': 100, | |
'D': 500, | |
'M': 1000 | |
]; |
View main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const IDLIST = 1001701270; | |
const anr_get_folder_res = { | |
"response": { "message": "OK" }, | |
"folders": [ | |
{ "_id": { "$id": "5ac746ea98a7677f52cc4f99" }, "title": "VEILLE TARIFAIRE", "query": "(((=assurance | =assurances | =assureur | =assureurs | bancassurance ) (=habitation | =automobile | =automobiles| =auto|=IARD | =MRH | =sant\u00e9 | =dommage | =dommages)) NEAR\/10 ((=prix | =cotisation | =cotisations |=tarif | =tarifs|=prime | =primes | =contrat | =contrats |=co\u00fbt | =co\u00fbts) (augmentation| hausse | baisse | majoration | =segmentation | diminution | \u00e9volution))) | ((mutuelle) NEAR\/10 ((=prix | =cotisation | =cotisations |=tarif | =tarifs|=prime | =primes | =contrat | =contrats |=co\u00fbt | =co\u00fbts) (augmentation| hausse | baisse | majoration | =segmentation | diminution | \u00e9volution)))", "partners_ids": [], "quotes": null, "quotes_expert_mode": false }, { "_id": { "$id": "5acb845498a767a00aecebc6" }, "title": "SATISFACTION CLIENTS", "query": "(=nps | \"net promoter score\" | |
View merge_vostfr.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# DEPENDENCIES | |
hash ffmpeg 2>/dev/null || { echo >&2 "ffmpeg required but it's not installed. Aborting."; exit 1; } | |
# CHECK INPUT FILES | |
if [ -z "$1" ]; then echo "No argument supplied, please add the movie path as first argument"; exit 2; fi | |
input=$1 | |
filename=$(basename "$input") |
View send_attachements_one_by_one.command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | |
cd "${DIR}" | |
MAILTO="abcd-1234@xyz.go" | |
find . -type f -depth 1 -iname "*pdf" -o -iname "*png" | while read f | |
do | |
ATTACH=$f |
View .powerlevel9k
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# iTerm font is SourceCode for powerlevel, size 11 | |
# https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy/patched | |
# | |
# iTerm Color theme is Seti | |
# https://github.com/willmanduffy/seti-iterm | |
# | |
POWERLEVEL9K_MODE='awesome-patched' | |
POWERLEVEL9K_NODE_VERSION_BACKGROUND='28' | |
POWERLEVEL9K_NODE_VERSION_FOREGROUND='15' | |
POWERLEVEL9K_VCS_MODIFIED_BACKGROUND='yellow' |
View .bash_profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
# Git tweeks | |
git_dir_shell=$(brew --prefix)/etc/bash_completion.d | |
if [ -f $git_dir_shell/git-prompt.sh -a -f $git_dir_shell/git-completion.bash -a -f $git_dir_shell/git-flow-completion.bash ]; then | |
source $git_dir_shell/git-prompt.sh | |
source $git_dir_shell/git-completion.bash | |
source $git_dir_shell/git-flow-completion.bash |
View .screenrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Turn off that annoying start up message | |
startup_message off | |
# Turn the even more annoying whole-screen-flash-on-tab-complete "feature" | |
vbell off | |
# Window list at the bottom. hostname, centered tabs and redmarked active windows: | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]' |
View .Xdefaults
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Defaults for all xterm clients | |
Xcursor.size: 28 | |
Xcursor.theme: Shere_Khan_X | |
! XTERM | |
XTerm*background: #191919 | |
XTerm*foreground: #FED053 | |
XTerm*highlightColor: magenta | |
XTerm*geometry: 71x21 | |
XTerm*font: xft:Terminus:pixelsize=10:antialias=false |
NewerOlder