Skip to content

Instantly share code, notes, and snippets.

View mohessaid's full-sized avatar
🏠
Working from home

Mohammed Essaid MEZERREG mohessaid

🏠
Working from home
View GitHub Profile
@mohessaid
mohessaid / switch.js
Created February 1, 2019 21:36
The switch statement quirck
View switch.js
var a = 'a';
var b = 'b';
switch(a,b){
case 'a', 'b':
console.log('first case');
break;
case 'z', 'd':
console.log('second case');
break;
@mohessaid
mohessaid / externallib.php
Created August 23, 2017 14:47
Moodle check_user_existance
View externallib.php
/**
* Return description of check_user_existance paramters.
*
* @return external_function_paramaters
* @since Moodle 3.2
*/
public static function check_user_existence_parameters(){
return new external_function_parameters(
array(
View yahoo_exchange_rates_jsonp.html
Get exchange rate as JSONP via YQL.
YQL Console: http://developer.yahoo.com/yql/console
Query (USD to SEK): select rate,name from csv where url='http://download.finance.yahoo.com/d/quotes?s=USDSEK%3DX&f=l1n' and columns='rate,name'
Example code:
<script type="text/javascript">