Skip to content

Instantly share code, notes, and snippets.

View atierant's full-sized avatar
👨‍💻
Man@Work

Arnaud Tiérant atierant

👨‍💻
Man@Work
View GitHub Profile
@atierant
atierant / rxjs_operators_by_example.md
Created February 6, 2019 13:12 — forked from btroncone/rxjs_operators_by_example.md
RxJS 5 Operators By Example
@atierant
atierant / git_submodules.md
Created January 6, 2017 14:04 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.
#!/bin/sh
# Settings for a PHP Project
# Using:
# * PHP Lint
# *- PHP CS
# *- PHP Analyzer
# *- EmptyLines Checker
# *- Scrutinizer
# * PHPCPD
@atierant
atierant / helper.php.sh
Created October 11, 2016 15:31 — forked from Avalarion/helper.php.sh
First Try with GitLab CI
#!/bin/sh
# Settings for a PHP Project
# Using:
# * PHP Lint
# *- PHP CS
# *- PHP Analyzer
# *- EmptyLines Checker
# *- Scrutinizer
# * PHPCPD
@atierant
atierant / genColorCodeFromText.php
Created March 2, 2016 14:21 — forked from mrkmg/genColorCodeFromText.php
Generate a unique color based on text input
<?php
/*
* Outputs a color (#000000) based Text input
*
* @param $text String of text
* @param $min_brightness Integer between 0 and 100
* @param $spec Integer between 2-10, determines how unique each color will be
*/
function genColorCodeFromText($text,$min_brightness=100,$spec=10)
@atierant
atierant / load-google-maps.js
Created February 4, 2016 16:26 — forked from gbakernet/load-google-maps.js
Load Google Maps API using jQuery Deferred.
/*!
* JavaScript - loadGoogleMaps( version, apiKey, language )
*
* - Load Google Maps API using jQuery Deferred.
* Useful if you want to only load the Google Maps API on-demand.
* - Requires jQuery 1.5
*
* Copyright (c) 2011 Glenn Baker
* Dual licensed under the MIT and GPL licenses.
*/
To install redis from debian backports we need to add the backports sources.
1. Add to /etc/apt/sources.list:
deb http://backports.debian.org/debian-backports squeeze-backports main
2. Retrieve debian key
$ gpg --keyserver pgp.mit.edu --recv-keys AED4B06F473041FA
import imaplib
import email
#connect to gmail
mail = imaplib.IMAP4_SSL('imap.gmail.com')
mail.login('email@gmail.com','yourPassWordPlease')
mail.select('inbox')
mail.list()