Skip to content

Instantly share code, notes, and snippets.

:octocat:
Working

Jonathan Lafleur jonathanlaf

:octocat:
Working
Block or report user

Report or block jonathanlaf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jonathanlaf
jonathanlaf / articulate-storyline3-howto.md
Last active Aug 27, 2019
How to disable Next buttons while timeline play. Articulate Storyline 3
View articulate-storyline3-howto.md

How to disable Next button while timeline play. Articulate Storyline 3

Here's my setup to disable Next button while the virtual teacher talk.

Set a global variable

  • In the top right corner of your Triggers panel click on the variable button "Variable button"
  • Add a new variable
    • Name: slidePlaying
    • Type: True/False
@jonathanlaf
jonathanlaf / articulate-free-menu-to-locked.md
Last active Jun 20, 2019
How to control menu type in Articulate Storyline 3 (with javascript)
View articulate-free-menu-to-locked.md

How to control menu type in Articulate Storyline 3 (with javascript)

Lock the menu untill you reach a certain slide

  • On the starting slide:
    • Set the variable introPlayed with a default of false on the starting slide.
    • Add a trigger with the following settings:
      • Action: Execute JavaScript
      • Script: see "Lock the menu"
      • When: Timeline starts
      • Object: make sure your starting slide is selected
@jonathanlaf
jonathanlaf / HowToSlackDark.md
Last active Aug 20, 2019
[Dark Slack] How to hack Slack to get a dark theme #slack #css #hack
View HowToSlackDark.md

🔥 How to "Hack" Slack to get a dark theme. 🔥

Slack Dark Theme

❗️ Close Slack if it's running ❗️

Installing theme

In your favorite text editor, open the following file :

  • Windows C:\Users\<USERNAME>\AppData\Local\slack\app-<VERSION>\resources\app.asar.unpacked\src\static\ssb-interop.js
@jonathanlaf
jonathanlaf / benchmark-for-vs-foreach.php
Last active Sep 26, 2018
[Benchmark Loops] Benchmark of FOR vs FOREACH loop functions in php #php #benchmark
View benchmark-for-vs-foreach.php
<?php
$a = array();
for ($i = 0; $i < 100000; $i++) {
$a[] = $i;
}
$start = microtime(true);
foreach ($a as $k => $v) {
$a[$k] = $v + 1;
}
@jonathanlaf
jonathanlaf / convertSameCaracterToSameAscii.php
Last active Aug 14, 2018
[Keyboard char to Ascii] Take care of different ASCII Code returned by a single caracter depending on Keyboard layout. #encoding #php #ascii
View convertSameCaracterToSameAscii.php
<?php
/*
* Accept array or string
*/
function convertSameCaracterToSameAscii($string)
{
$tab_chr = array() ;
for($control = 0; $control < 32; $control++) {
if ($control != 9 && $control != 10) {
$tab_chr[]= chr($control) ;
@jonathanlaf
jonathanlaf / getClosestLowerValue.php
Last active Aug 14, 2018
[Closest value operator] Get closest value (of an array) before a given one #php #operand
View getClosestLowerValue.php
<?php
function valueExpected ($analyse, $expect, $strict = false)
{
if ($strict)
{
if ($analyse === $expect)
{
return '<span style="background-color:darkolivegreen; color:darkgrey;">Received : ' .
$analyse .
', Expected : ' .
@jonathanlaf
jonathanlaf / wpex_pagination.php
Last active Aug 14, 2018
[wpexplorer's WordPress pagination script enhanced.] #wordpress
View wpex_pagination.php
/*
* Numbered Pagination
* http://www.wpexplorer.com/pagination-wordpress-theme/
*/
if ( !function_exists( 'wpex_pagination' ) ) {
function wpex_pagination($wpex_query) {
$prev_arrow = is_rtl() ? '&rarr;' : '&larr;';
$next_arrow = is_rtl() ? '&larr;' : '&rarr;';
/*
You can’t perform that action at this time.