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
| #!/bin/bash | |
| # force 8 workspaces | |
| wmctrl -n 8 | |
| # launch | |
| eclipse & | |
| firefox -P default & | |
| thunderbird & | |
| amsn & |
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
| #!/bin/bash | |
| git_pull () { | |
| echo "" | |
| echo "## Updating $1 ##" | |
| echo "" | |
| cd $1 | |
| git pull | |
| cd - > /dev/null | |
| } |
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
| @Test | |
| public void when_plain_text_then_equal_text_returned() { | |
| assertThat(markupKiller.stripTags("10 < 9")).isEqualTo("10 < 9"); | |
| } | |
| @Test | |
| public void when_unbalanced_html_then_markup_removed() { | |
| assertThat(markupKiller.stripTags("<b>10 < 9")).isEqualTo("10 < 9"); | |
| assertThat(markupKiller.stripTags("<b id='whatever'>10 < 9<img />")).isEqualTo("10 < 9"); | |
| } |
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
| StringBuilder whereConstraints = new StringBuilder(); | |
| if (!isEmpty(typesActu)) { | |
| whereConstraints.append(" AND a.type_id IN (?) "); | |
| } | |
| if (!isEmpty(newsletters)) { | |
| whereConstraints.append(" AND (ap.profils_id IN (?) OR ap.profils_id IS NULL)"); | |
| } | |
| if (!isNullOrEmpty(term)) { | |
| whereConstraints.append(" AND (titre LIKE (?) OR texte_complet LIKE(?) ) "); | |
| } |
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
| #!/bin/zsh | |
| source /home/fbiville/.zshrc | |
| if [[ -z "$@" ]]; then | |
| echo "ERROR: specify a nonempty command" | |
| else | |
| eval "$@"; notify-send "`pwd`: command finished" | |
| fi |
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
| #!/bin/zsh | |
| sed ''/$1/s//`printf "\033[1;32m$1\033[0m"`/'' |
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
| package com.github.fbiville.coursera.algorithmics_stanford.week5; | |
| import static org.assertj.core.api.Assertions.assertThat; | |
| import static org.assertj.core.util.Lists.newArrayList; | |
| import org.testng.annotations.Test; | |
| import com.google.common.collect.Lists; | |
| public class DijkstraTest { |
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
| Example CREATE (flo:CONTACT {name: 'Florent'}) RETURN flo; | |
| CREATE (eric:CONTACT {name: 'Eric'}) RETURN eric; | |
| CREATE (jb:CONTACT {name: 'Jean-Baptiste'}) RETURN jb; | |
| CREATE (samuel:CONTACT {name: 'Samuel'}) RETURN samuel; | |
| CREATE (meta:COMPANY {name: 'Metaboli'}) RETURN meta; | |
| CREATE (lt:COMPANY {name: 'Lateral Thoughts'}) RETURN lt; | |
| // -- Florent worked for Metaboli | |
| MATCH (flo:CONTACT), (meta:COMPANY) |
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
| CREATE (p:PATIENT {firstName:"Robert", lastName:"Patraque"}) RETURN p; | |
| CREATE (p:PATIENT {firstName:"Chantale", lastName:"Tristoune"}) RETURN p; | |
| CREATE (s:SYMPTOM {name:"Écoulement nasal"}) RETURN s; | |
| CREATE (s:SYMPTOM {name:"Fièvre"}) RETURN s; | |
| CREATE (s:SYMPTOM {name:"Éructations"}) RETURN s; | |
| CREATE (s:SYMPTOM {name:"Flatulences"}) RETURN s; | |
| CREATE (s:SYMPTOM {name:"Vomissement"}) RETURN s; |
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
| define( ['jquery', 'underscore', 'async', 'moment', 'Handlebars'], | |
| function($, _, async, moment, Handlebars) { | |
| var crossOriginFeedParserUrl = function(limit, feedUrl) { | |
| return document.location.protocol + | |
| '//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num='+ | |
| limit+ | |
| '&callback=?&q=' + | |
| encodeURIComponent(feedUrl); | |
| }, |
OlderNewer