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 | |
#a black | |
#b red | |
#c green | |
#d brown | |
#e blue | |
#f magenta | |
#g cyan | |
#h light grey |
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 | |
# paste this command to your terminal | |
# sudo apt-get install curl && bash <(curl -s https://gist.github.com/MartyLake/da7163333e92c80db4cb) | |
echo "Setting up the environement !" | |
echo "Installing gcc, gedit, zsh" | |
apt-get install gcc gedit gedit-plugins zsh |
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/sh | |
# | |
# Automaticaly push every commit but not branch | |
BRANCH_NAME=$(git branch | grep '*' | sed 's/* //') | |
if [ $BRANCH_NAME != '(no branch)' ] && [ $BRANCH_NAME != 'master' ] | |
then | |
# your regularly scheduled hook | |
exec git push |
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
### Keybase proof | |
I hereby claim: | |
* I am martylake on github. | |
* I am martylake (https://keybase.io/martylake) on keybase. | |
* I have a public key whose fingerprint is C0C4 31E4 4649 39DA CE93 0F78 F300 56ED 2AB9 606F | |
To claim this, I am signing this object: |
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
set encoding=utf-8 " The encoding displayed. | |
set fileencoding=utf-8 " The encoding written to file. | |
set guifont=Source_Code_Pro:h12:cANSI:qDRAFT | |
set syntax=on | |
set backspace=2 " make backspace work like most other apps | |
set whichwrap+=<,>,h,l,[,] "left and right will go back to previous/next line | |
set number "display line numbers | |
set nolist "IDK, related to wrap and linebreak | |
set wrap "wrap text when window is too short |
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
# dont normalize here if songs have different intensity, for example quiet intro song followed by loud pop song | |
# from http://normalize.nongnu.org/README.html | |
# normalize -bv *.wav | |
# from https://gist.github.com/championofblocks/3982727 | |
for i in *.wav; do lame -b 320 -h "${i}" "${i%.wav}.mp3"; done | |
# from https://askubuntu.com/questions/65331/how-to-convert-a-m4a-sound-file-to-mp3 | |
# + https://askubuntu.com/questions/385636/what-is-the-proper-way-to-convert-flac-files-to-320-kbit-sec-mp3 | |
find . -type f -name '*.m4a' -exec bash -c 'avconv -i "$0" -qscale:a 0 "${0/%m4a/mp3}"' '{}' \; |
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 | |
set -euo pipefail | |
IFS=$'\n\t' | |
#set -x #debug mode | |
HELPSTRING="Usage: | |
$ sh consolidateM3u.sh -p \"./playlist.m3u\" -o \"./outputDir/\"" | |
function printHelp { | |
echo "$HELPSTRING" | |
} |
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 | |
set -euo pipefail | |
IFS=$'\n\t' | |
input_file="in.csv" | |
output_file="out.csv" | |
NUMOFLINES=$(wc -l < ${input_file}) | |
it=0 |
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
#from https://stackoverflow.com/questions/17125269/embed-python-in-makefile-to-set-make-variables | |
define NEWLINE | |
endef | |
define DETECT_SDK | |
import os | |
locations = [ |
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
all: | |
long_operation.sh | |
notify: | |
display -resize 1000x1000 '${HOME}/done.jpg' | |
#if you want to get notified at the end of long operetion, just use: | |
# ’make all notify’ |
OlderNewer