Skip to content

Instantly share code, notes, and snippets.

View EpokK's full-sized avatar

Richard EpokK

View GitHub Profile
@EpokK
EpokK / test.md
Last active March 26, 2020 01:08
FE Test: Modern Website

FE Test: Modern Website

Design

From this design, create a website using a static site generator like Gatsby or Next. Apply the appropriate CSS style to respect the design. Supporting responsive is optional.

Once done, upload your project on GitHub or GitLab. Then email back the git repository URL or zip the project to the person who sent the task.

Notes

Keybase proof

I hereby claim:

  • I am epokk on github.
  • I am epokk (https://keybase.io/epokk) on keybase.
  • I have a public key whose fingerprint is 9622 0F0C EF0C 7089 FE61 FDAD 925A DE16 89E0 2EC0

To claim this, I am signing this object:

@EpokK
EpokK / unsafe.filter.js
Created March 23, 2015 10:13
trustAsHtml filter
app.filter('unsafe', function($sce) {
return $sce.trustAsHtml;
});
@EpokK
EpokK / focus.js
Created March 5, 2015 08:37
Move Caret to End of Input or Textarea
var focus = function(input) {
if (typeof input.selectionStart === "number") {
input.selectionStart = input.selectionEnd = input.value.length;
} else if (typeof input.createTextRange !== "undefined") {
input.focus();
var range = input.createTextRange();
range.collapse(false);
range.select();
}
};
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<div class="steps">
<a href="" class="step step1">1</a>
<div class="line line1"></div>
<a href="" class="step step2">2</a>
<div class="line line2"></div>
@EpokK
EpokK / vanilla.js
Last active August 29, 2015 14:13
Usefull Vanilla functions
var isMobile = function() {
return !!navigator.userAgent.match(/Android|BlackBerry|BB10; Touch|iPhone|iPad|iPod|Opera Mini|IEMobile/i);
};
Array.prototype.clone = function () {
return Array.prototype.slice.call(this, 0);
};
Array.prototype.clear = function() {
this.length = 0;
@EpokK
EpokK / dnd.js
Created November 24, 2014 14:29
dnd js natif with angularJS
var app = angular.module('dragDrop', []);
app.directive('draggable', function() {
return function(scope, element) {
// this gives us the native JS object
var el = element[0];
el.draggable = true;
el.addEventListener(
@EpokK
EpokK / ng-really.js
Created July 18, 2014 07:07
ng-really? An AngularJS directive that creates a confirmation dialog for an action.
/**
* A generic confirmation for risky actions.
* Usage: Add attributes: ng-really-message="Really?" ng-really-click="takeAction()" function
*/
angular.module('app').directive('ngReallyClick', [function() {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.bind('click', function() {
var message = attrs.ngReallyMessage;
@EpokK
EpokK / inject.js
Created June 26, 2014 14:27
Realiser une injection dans les routes d'AnuglarJS
var resolver = {
crew: function ($q, $route, $timeout, starTrekResource) {
//...
}
}
resolver.crew.$inject = ['$q','$route, '$timeout',' 'starTrekResource'];
$routeProvider.when("/:starship", {
templateUrl:"partials/starship.html",