Skip to content

Instantly share code, notes, and snippets.

View brunobuddy's full-sized avatar
🍻

Bruno brunobuddy

🍻
View GitHub Profile

UE4 Conception, optimisation et pilotage d'un site Web : Etude de cas

Introduction

L’objectif de cette étude de cas est de vous plonger dans un cas concret dans lequel vous allez devoir utiliser les connaissances et expériences acquises en cours. L’évaluation de votre retour comptera comme votre note individuelle du cours.

Il n’y a pas une seule façon de faire les choses, vous faites vos propres choix et toutes les propositions sont valables du moment qu’elles répondent aux objectifs. Soyez créatifs tout en gardant les pieds sur terre.

Les réponses doivent être envoyés par email en pièce jointe (Word, PDF...) à bruno@buddyweb.fr

@brunobuddy
brunobuddy / simple-toggle-item-selection.ts
Created August 7, 2019 09:35
Simple Toggle Item from Array (add or remove) in TS / JS ES6
const selectedItemIds: number[] = []
toggleSelect(itemId: number) {
if (this.selectedItemIds.includes(itemId)) {
// Remove item from Array if already selected
const index = this.selectedItemIds.indexOf(itemId)
this.selectedItemIds.splice(index, 1)
} else {
// Adds item to Array
this.selectedItemIds.push(itemId)
@brunobuddy
brunobuddy / cookie-modal.ts
Created April 30, 2019 16:19
Angular TS Component for GRPD Compliant Cookie Modal Dialog
@brunobuddy
brunobuddy / cookie-modal.html
Last active May 3, 2019 08:00
Angular HTML Template for GRPD Compliant Cookie Modal Dialog
@brunobuddy
brunobuddy / enableOrDisableGoogleAnalytics.html
Last active April 30, 2019 13:27
Custom script for Google Tag Manager to enable or disable Google Analytics tracking based on the presence of the "accept_cookies" cookie
<script>
// If no cookie
if( document.cookie.indexOf('accept_cookies=') == -1) {
// Disable Google Analytics
window['ga-disable-UA-XXXXXXXX-X'] = true;
}
else {
// Enable Google Analytics
window['ga-disable-UA-XXXXXXXX-X'] = false;
}
@brunobuddy
brunobuddy / BetDemocracy.sol
Created June 21, 2018 11:28
BetDemocracy V 0.1 Contract
pragma solidity 0.4.17;
import "./JsmnSolLib.sol";
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol";
import "github.com/Arachnid/solidity-stringutils/src/strings.sol";
contract BetDemocracy is usingOraclize {
using strings for *;
@brunobuddy
brunobuddy / validateRegistrationNumber.ts
Created June 8, 2018 09:50
TypeScript SIRET Validation Script (French company registration number)
// Returns true if valid, false if not. Note that registrationNumber param is a string (usually provided by HTML imput)
validateRegistrationNumber(registrationNumber: string): boolean {
if (registrationNumber.length !== 14) {
return false
}
let sum = 0
let digit: number
for (let i = 0; i < registrationNumber.length; i++) {
if (i % 2 === 0) {
digit = parseInt(registrationNumber.charAt(i), 10) * 2
@brunobuddy
brunobuddy / smoothscroll.js
Created August 21, 2015 09:39
Smooth Scroll
/*-----------------------------------*\
#Smooth Scroll
\*-----------------------------------*/
$('.smooth-scroll').click( function() {
var page = $(this).attr('href');
var headerHeight = 80;
var speed = 400; // Durée de l'animation (en ms)
$('html, body').animate( { scrollTop: $(page).offset().top - headerHeight }, speed ); // On récupére l'espace perdu avec le header.
return false;