Skip to content

Instantly share code, notes, and snippets.

View mtancoigne's full-sized avatar

Manuel Tancoigne mtancoigne

View GitHub Profile
@mtancoigne
mtancoigne / tmp_pluginActivation.php
Created December 13, 2014 14:19
PluginActivation simplification
<?php
/**
* Events Activation
*
* Activation class for Events plugin.
* This is optional, and is required only if you want to perform tasks when your plugin is activated/deactivated.
*/
class EventsActivation {
/**
@mtancoigne
mtancoigne / croogo-link-activation.php
Created January 11, 2015 00:01
Cant create all links with this...
@mtancoigne
mtancoigne / change.php
Last active November 5, 2015 19:30
Password check for password change in cakePHPx
<?php
// in Model/Entity/User.php
public function comparePassword($password)
{
return (new DefaultPasswordHasher)->check($password, $this->password);
}
// In user/<someview>.ctp
echo $this->Form->create($user, ['action' => 'update_password']);
echo $this->Form->input('current_password', ['type' => 'password', 'label' => __d('users', 'Current password')]);
@mtancoigne
mtancoigne / create_react.sh
Last active October 30, 2016 17:36
Sets up a basic React project
#!/bin/bash -
#title :create_react.sh
#description :Small script to get started with React+webpack+babel.
# Inspired by this tutorial: https://www.codementor.io/reactjs/tutorial/beginner-guide-setup-reactjs-environment-npm-babel-6-webpack
#author :Manuel Tancoigne
#date :20161030
#version :1.0
#usage :./create_react.sh [<project_name>]
#notes :
#bash_version :4.3.42(1)-release
@mtancoigne
mtancoigne / App.vue
Created April 25, 2017 11:53
Hangman game
<template>
<div id="app">
<div v-if="!gagne && !perdu">
<h1>Le pendu avec les animaux</h1>
<pre class="mot">{{motADeviner}}</pre>
<div>
<button v-for="l in lettres"
@click="testeLettre(l)"
:disabled="testees.indexOf(l) > -1"
class="btn-lettre"
@mtancoigne
mtancoigne / events.md
Created April 26, 2017 00:09
Test with diagram

CakePHP events timeline

Events timeline for standard CakePHP actions. These events were taken from the DebugKit's Timeline

Index, View

Core Processing (Derived from $_SERVER["REQUEST_TIME"])

  • Event: Controller.initialize (Cookbook)
  • Event: Controller.startup (Cookbook)
  • Controller action (view)
@mtancoigne
mtancoigne / GafaLinks.scss
Created October 22, 2017 09:20
CSS Style to use with UserStyles, which makes the GAFA links stand out

Keybase proof

I hereby claim:

  • I am mtancoigne on github.
  • I am mtancoigne (https://keybase.io/mtancoigne) on keybase.
  • I have a public key whose fingerprint is 1000 50F3 D9B8 ED8F B8B2 F69B D0FE 6B33 0973 5AC5

To claim this, I am signing this object:

@mtancoigne
mtancoigne / App.vue
Created September 26, 2018 20:18
Something that follows scrolling in VueJS (using $refs)
<template>
<div id="app">
<ul class="trails">
<li class="trail">
<div class="caption" :class="sectionsClasses.section_1">El 1</div>
</li>
<li class="trail">
<div class="caption" :class="sectionsClasses.section_2">El 2</div>
</li>
<li class="trail">
{
"arabic": [
"aghoneim92",
"Islam888",
"kmelkon",
"lelbil",
"nrifki",
"OsamaNabih",
"TaqwaR"
],