Quelques caractères necessaires en programmation et qui ne sont pas forcément faciles à trouver sur un clavier Apple français:
-
{
ALT + ( -
}
ALT + ) -
[
ALT + SHIFT + ( -
]
ALT + SHIFT + ) -
|
ALT + SHIFT + L
<?php | |
function get_combinations($arrays) { | |
$result = array(array()); | |
foreach ($arrays as $property => $property_values) { | |
$tmp = array(); | |
foreach ($result as $result_item) { | |
foreach ($property_values as $property_value) { | |
$tmp[] = array_merge($result_item, array($property => $property_value)); | |
} |
/** | |
* This casper scipt checks for 404 internal links for a given root url. | |
* | |
* Usage: | |
* | |
* $ casperjs 404checker.js http://mysite.tld/ | |
* $ casperjs 404checker.js http://mysite.tld/ --max-depth=42 | |
*/ | |
/*global URI*/ |
Quelques caractères necessaires en programmation et qui ne sont pas forcément faciles à trouver sur un clavier Apple français:
{
ALT + (
}
ALT + )
[
ALT + SHIFT + (
]
ALT + SHIFT + )
|
ALT + SHIFT + L
-moz-font-feature-settings: "liga=1, dlig=1"; | |
-ms-font-feature-settings: "liga", "dlig"; | |
-o-font-feature-settings: "liga", "dlig"; | |
-webkit-font-feature-settings: "liga", "dlig"; | |
font-feature-settings: "liga", "dlig"; |
(function($){ | |
$.fn.replace_html = function(html){ | |
return this.each(function(){ | |
var el = $(this); | |
el.stop(true, true, false); | |
var finish = {width: this.style.width, height: this.style.height}; | |
var cur = {width: el.width() + "px", height: el.height() + "px"}; | |
el.html(html); | |
var next = {width: el.width() + "px", height: el.height() + "px"}; | |
el.css(cur).animate(next, 300, function(){el.css(finish);}); |
var myArray = ["aaaaa", "bbbbb", "ccccc"]; | |
for (var i = 0, oneItem; oneItem = myArray[i]; i++){ | |
console.log( oneItem ); | |
} |
a tiny code snipplet that less technical users can copy/paste on their website to show how many times it was already shared and/or how many people follow you
Windows 7 desktop app in the style of the good version of Tweetdeck (a.k.a the cross-platform AIR version, before Tweetdeck was bought by Twitter)
<video width="400" height="300" controls="controls" poster="video.jpg"> | |
<!-- video format depending on what the browser supports --> | |
<source src="video.mp4" type="video/mp4" /> | |
<source src="video.webm" type="video/webm" /> | |
<source src="video.ogv" type="video/ogg" /> | |
<!-- flash fallback if the browser doesn't support HTML5 --> | |
<object type="application/x-shockwave-flash" width="400" height="300" data="video.swf"> | |
<param name="movie" value="video.swf" /> |
CREATE OR REPLACE FUNCTION upsert_tableName(arg1 type, arg2 type) RETURNS VOID AS $$ | |
DECLARE | |
BEGIN | |
UPDATE tableName SET col1 = value WHERE colX = arg1 and colY = arg2; | |
IF NOT FOUND THEN | |
INSERT INTO tableName values (value, arg1, arg2); | |
END IF; | |
END; | |
$$ LANGUAGE 'plpgsql'; |
DECLARE | |
r record; | |
BEGIN | |
FOR r IN SELECT (each(hstore(NEW))).* | |
LOOP | |
RAISE NOTICE '% value is %', r.key, quote_nullable(r.value); | |
END LOOP; | |
RETURN NEW; | |
END |