Skip to content

Instantly share code, notes, and snippets.

View pixeline's full-sized avatar
😄
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 !
View GitHub Profile

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).

@pixeline
pixeline / create-hosting-user.sh
Created October 10, 2019 06:46
Create hosting user (Nginx).
#!/bin/bash
# Script automating the creation of a hosting account : the user, its folder, its virtualhost
: '
HOW-TO
$ bash /home/pixeline/bin/create-hosting-user username password domain.tld
Arguments:
- username (if not created, create it, otherwise use current) SEE https://gist.github.com/pixeline/9e5ea7d28e52138f0b31
- user password (for existing user, enter anything, it will not be used)
@pixeline
pixeline / script.sh
Last active March 23, 2022 17:22 — forked from thimbl/script.sh
#!/bin/bash
# script automatisant la création d'un compte hébergé: utilisateur + dossier + virtualhost
# Enter dummy password if you wish to attach domain to an existing user.
: '
HOW-TO
$ bash /home/pixeline/bin/create-hosting-user username password domain.tld
Arguments:
@pixeline
pixeline / create-hosting-user (Apache2)
Last active March 23, 2022 17:20
Create Hosting User script, for easy Apache web hosting administration.
#!/bin/bash
# script useful to create hosting user accounts for Apache.
# It creates the system user, its home folder and the virtualhost
# Enter a dummy password if you wish to attach domain to an existing user.
: '
USAGE
$ bash /home/pixeline/bin/create-hosting-user username password domain.tld
Arguments:

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 / class-wp-numeric-pagination.php
Last active April 8, 2020 15:41
Wordpress Numeric Pagination Class that enables you to set the classes of each LI and A html tag.
<?php
/**
* Numeric Pagination Class
* @author Alexandre Plennevaux https://pixeline.be
*
* This class returns a list of LI > A. It is up to you to set the wrapping NAV > UL around your function call.
*
* @usage (setting specific classes)
*
* // Sets the css classes you want to be used for the output
@pixeline
pixeline / virtualhost_le_template (Apache)
Last active October 10, 2019 05:52
virtualhost template to use for sites ssl-ed via letsencrypt.org
<VirtualHost *:80>
ServerAdmin template.email
ServerName template.url
ServerAlias www.template.url
DocumentRoot template.webroot
<Directory template.webroot>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
@pixeline
pixeline / React-learning-States-and-events.js
Created August 28, 2019 18:51
Pure React, Chapter 11: Exercise at the end of the chapter. Is this a proper react way to pass the ID to the state ?
const Room = ({onAction, room, children}) =>(
<button id={room} onClick={onAction} >{children}</button>
)
class House extends React.Component {
state = {
rooms: {
kitchen: true,
bathroom: false,
livingRoom: true,
@pixeline
pixeline / basic_sass_features.md
Last active August 28, 2019 11:12 — forked from blackfalcon/basic_sass_features.md
Exercises in basic Sass features

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

<?php
//ini_set('display_errors',1);
//error_reporting(E_ALL | E_WARNING);
function is_valid_url($url){
$url = filter_var($url, FILTER_SANITIZE_URL);
return filter_var($url, FILTER_VALIDATE_URL);
}
/* RUNTIME */