This file contains hidden or 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
| #!/usr/bin/env bash | |
| # Author: Guillaume Charmetant <[email protected]> | |
| # Twitter: @cGuille | |
| # GitHub: cGuille | |
| # Installation instructions: | |
| # - Put this file in your home directory; | |
| # - Allow its execution (chmod +x .todorc); | |
| # - Add the following lines WITHOUT THE '#' AT THE BEGINING OF LINES to the end of the file '~/.bashrc': |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # Install the Dropbox client so it runs at start up on KDE: | |
| # Set up the destination folder of the Dropbox client (default: your home directory): | |
| INSTALLATION_FOLDER=$HOME | |
| # Choose your platform, 64 or 32 bits (default to 64): | |
| PLATFORM=lnx.x86_64 # 64 bits | |
| #PLATFORM=lnx.x86 # 32 bits | |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| BACKSLASH = '\\' | |
| class StringEscaper | |
| def initialize chars_to_escape, escaper = BACKSLASH | |
| # The escaper char must be escaped as well: | |
| chars_to_escape.push(escaper) unless chars_to_escape.include?(escaper) | |
| # We escape backslashes as they are the regex escape character: | |
| regex_content = chars_to_escape.join('|').gsub! '\\', '\\\\\\' |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| USAGE="USAGE: ${0} first-program second-program [-v|--verbose]" | |
| if [[ $# != 2 && $# != 3 ]]; then | |
| echo "${USAGE}" 1>&2 | |
| exit 100 | |
| fi | |
| FIRST_PROGRAM="${1}" | |
| SECOND_PROGRAM="${2}" |
This file contains hidden or 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
| #!/usr/bin/env node | |
| /* | |
| Author: @cGuille <[email protected]> | |
| Usage: node lsxmltree <xml file path> | |
| The MIT License (MIT) | |
| Copyright (c) 2015 Guillaume Charmetant |
This file contains hidden or 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 debian:8.1 | |
| MAINTAINER @cGuille <[email protected]> | |
| RUN apt-get update && apt-get -y dist-upgrade | |
| RUN apt-get install -y golang git | |
| ENV GOPATH /usr/go | |
| RUN mkdir $GOPATH | |
| ENV PATH $GOPATH/bin:$PATH |
This file contains hidden or 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
| function ssha_passwd() { | |
| local clear_pass | |
| read -sp 'Password: ' clear_pass | |
| local salt="$(openssl rand -base64 3)" | |
| local ssha_pass=$(printf "${clear_pass}${salt}" |openssl dgst -binary -sha1 |sed 's#$#'"${salt}"'#' |base64); | |
| echo "{SSHA}$ssha_pass" | |
| } |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| LIGHT_GREEN='\e[1;32m' | |
| NO_FORMAT='\e[0m' | |
| UNDERLINE='\e[4m' | |
| RESET_UNDERLINE='\e[24m' | |
| COMMIT_MESSAGE="$(git show -s --format=%s HEAD)" | |
| echo -e "${LIGHT_GREEN}When applied, this commit will ${UNDERLINE}${COMMIT_MESSAGE}${RESET_UNDERLINE}.${NO_FORMAT}" |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>String concatenation</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
| <script src="./suite.js"></script> | |
| </head> | |
| <body> | |
| <h1>Open the console to view the results</h1> |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # USAGE: | |
| # remindme {WHEN} {REMINDER MESSAGE} | |
| # - The first argument must be compliant with DATE(1) and defines when to remind you. | |
| # - The following arguments are a message to be delivered in a desktop notification. | |
| # | |
| # Examples: | |
| # remindme tomorrow Write an e-mail to John Doe | |
| # remindme '20160705 17:25' Call Jane Doe |
OlderNewer