Skip to content

Instantly share code, notes, and snippets.

😄
Heaven, I'm in heaven, And my heart beats so that I can hardly speak !

Alexandre Plennevaux pixeline

😄
Heaven, I'm in heaven, And my heart beats so that I can hardly speak !
Block or report user

Report or block pixeline

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pixeline
pixeline / readme.md
Created Jun 1, 2019
Deploy a "docker-composed" environment on DigitalOcean
View readme.md

Deploy docker-compose on digitalocean

  1. create Docker droplet via digitalocean one-click-app-docker
  2. log into it
  3. generate SSH key
ssh-keygen -t rsa -N "" -f /root/.ssh/id_rsa
  1. Copy it
@pixeline
pixeline / function.remove_empty_html_tags.php
Last active Apr 28, 2019
PHP function removing all empty html nodes from a given html fragment. Useful for cleaning content entered via WYSIWYG editors.
View function.remove_empty_html_tags.php
<?php
function remove_empty_html_tags($html)
{
/**
* PHP function removing all empty html nodes from a given html fragment. Useful for cleaning content entered via WYSIWYG editors.
* source: https://stackoverflow.com/a/42067229/53960
* Regex by Mark Notton
*/
$regex = '~<((?!iframe|canvas)\w+)[^>]*>(?>[\p{Z}\p{C}]|<br\b[^>]*>|&(?:(?:nb|thin|zwnb|e[nm])sp|zwnj|#xfeff|#xa0|#160|#65279);|(?R))*</\1>~iu';
return preg_replace($regex, '', $html);
View CloseTheGap.md

Aloha,

Je voudrais une chouette photo permettant de remercier close the gap de fournir tous les laptops gratuitement.

Pourriez vous prévoir cette semaine (peut être quand Charleroi vient ?) de réaliser ceci: Chaque écran de laptop qui affiche un "merci" en géant. Chaque apprenant peu choisir:

  • la langue du merci (chaque écran dans une autre langue)
  • couleur écriture et couleur fond
  • typographie et disposition (sens et rotation)
View reactjs.md

JS Frameworks : ReactJS

Il y a le backend, il y a le frontend... Et il y a les frameworks Javascript tels que Angular (made in Google), Vue.js (opensource) et React (Made in Facebook).

A priori, ce sont d'abord des outils pour faire du frontend, mais avec la particularité que vous pouvez manipuler des services de données externes (tels que Firebase ou AWS) directement depuis votre code frontend. Des bâtards, quoi.

Quel est leur intérêt ?

Ils sont particulièrement indiqués pour les applications web et les interfaces très réactives, plus que pour les simples sites vitrines (où l'utilisateur va surtout lire).

View calculer-tarifs-salaires.md

Discussion sur les tarifs/salaires:

résumé d'une discussion chez BeCode/Lovelace2 (animée par Juan et Alex).

Les questions

  • Comment savoir combien je vais gagner en tant qu’employé?
  • Comment négocier mon contrat/salaire?
  • En tant qu’indépendant, combien demander pour la réalisation d’un site?

Les infos récoltées

@pixeline
pixeline / basic_sass_features.md
Created Dec 3, 2017 — forked from blackfalcon/basic_sass_features.md
Exercises in basic Sass features
View basic_sass_features.md

Sass is a powerhouse language that is adding new features all the time. For this introduction we will go over the basics of the language and see how they all tie together. We will discuss nesting, parent selector definitions, variables, Sass math, @extends, and @mixins.

Code comments

Commenting your code is the number one awesome thing any developer can do. In CSS you can place comments in your code /* */, but this will appear in the actual CSS and sometimes you don't want or need all that stuff to be there.

In Sass comments are highly encouraged. Sass has what are called 'silent comments' using the // syntax. This will allow the developer to comment like crazy and none of this is exposed in the final CSS. An interesting feature is that Sass supports both types of comments.

Scss

View Good bye promo1.md

Voilà. C'est quasi fini. 25 avril --> 27 octobre 2017

185 jours
15.984.000 secondes
266.400 minutes
4440 heures
26 semaines et 3 jours.

Vous avez été la première promo de BeCode.

View WordPress .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@pixeline
pixeline / php_upgrade_to_71.sh
Last active May 14, 2019
Update Mac Os X's php version to php 7.1 using homebrew. Includes curl and mcrypt
View php_upgrade_to_71.sh
# 1. Install brew --> http://brew.sh/
# 2. run the following commands in your Terminal
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install --with-openssl curl
brew install --with-homebrew-curl --with-apache php71
brew install php71-mcrypt php71-imagick
# 3. Follow these instructions to make Apache and php-cli use the newer php executable and make the change persist after reboot.
brew info php71
@pixeline
pixeline / functions.php
Last active Jan 23, 2018
Function to prevent orphans in WordPress post titles. It simply replaces the last space after the penultimate word of a title by a non-breaking space. Pfew.
View functions.php
function add_nonbreaking_space_to_text($title, $id = null){
$title = explode(' ', $title);
$length = count($title);
if( $length >0){
$title[ $length-2 ] .= "&nbsp;" . $title[ $length-1 ];
array_pop($title);
}
return implode(" ", $title);
}
You can’t perform that action at this time.