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 python | |
import sys | |
from PySide2.QtWidgets import QApplication, QWidget, QLabel, QVBoxLayout | |
from PySide2.QtGui import Qt | |
class HelloApplication(QApplication): | |
def __init__(self, args): | |
QApplication.__init__(self, args) |
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
var gulp = require('gulp'); | |
var ts = require('gulp-typescript'); | |
var browserify = require('browserify'); | |
var source = require('vinyl-source-stream'); | |
var tsify = require('tsify'); | |
/* for NODE */ | |
/* gulp.task('default', function() { |
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
<?php | |
// dotenv.php | |
// A helper script for PHP sites hosted on servers where environement variables | |
// are disabled in apache .htaccess (making mod_env and SetEnv useless) | |
// URL: https://gist.github.com/glenux/a727a02614b2d37a963967d1b6759073 | |
function dotenv_file() { | |
$dotenv = 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
#!/bin/sh | |
set -e | |
set -u | |
INPUT="${1:-}" | |
OUTPUT="${2:-}" | |
if [ -z "$INPUT" ]; then | |
echo "ERROR: please give a input file name" |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
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 | |
org="$(git remote get-url origin |awk -F/ '{ print $4; }')" | |
project="$(basename "$(git rev-parse --show-toplevel)")" | |
branch=$(git rev-parse --abbrev-ref HEAD) | |
url="https://bitbucket.org/${org}/${project}/pull-request/new?source=${branch}&t=1" | |
xdg-open "$url" | |
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 | |
org="$(git remote get-url origin |awk -F/ '{ print $4; }')" | |
project="$(basename "$(git rev-parse --show-toplevel)")" | |
branch=$(git rev-parse --abbrev-ref HEAD) | |
url="https://bitbucket.org/${org}/${project}/pull-request/new?source=${branch}&t=1" | |
xdg-open "$url" | |
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
/* | |
Exercice - prixttc (10 min) | |
=========================== | |
A. Ecrire une fonction 'prixTTC' qui: | |
- prend un parametre numérique (prix_ht) | |
- calcule le prix TTC (rappel: la TVA est de 20%) | |
- retourne le prix TTC. | |
B. Vérifier votre fonction avec le programme suivant : |