Skip to content

Instantly share code, notes, and snippets.

View mklabs's full-sized avatar

Mickael Daniel mklabs

View GitHub Profile
@mklabs
mklabs / build.sh
Last active April 25, 2025 12:52 — forked from velyan/Build Skia on MacOS
Steps to build Skia on MacOS
# brew install ninja
mkdir $HOME/deps
cd $HOME/deps
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
git clone https://github.com/google/skia.git
export PATH="${PWD}/depot_tools:${PATH}"
cd skia
python tools/git-sync-deps
<?php
header('content-type: application/json; charset=utf-8');
/* * /
$phi = array('okey' => 0, 'object' => array ("firstName"=> 'Philippe', 'lastName'=> 'Charriere'));
$j = array('okey' => 1, 'object' => array ('firstName'=> 'John', 'lastName'=> 'Resig'));
$v = array('okey' => 2, 'object' => array ('firstName'=> 'Linus', 'lastName'=> 'Torvald'));
$m = array('okey' => 3, 'object' => array ('firstName'=> 'Douglas', 'lastName'=> 'Crockford'));
/* */
function list_return(return_values){
this.Objects = return_values;
function add_li(list, text) {
var list = document.getElementById(list);
var li = document.createElement("li");
li.innerHTML = text;
list.appendChild(li);
}
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}