Skip to content

Instantly share code, notes, and snippets.

@damusnet
damusnet / ck.php
Created October 9, 2010 12:24
CKEditor Helper for CakePHP v1.3.4
<?php
/**
* Helper CKEditor pour CakePHP v1.3.4
* Code Original par Pierre-Emmanuel Fringant
* URL : http://www.formation-cakephp.com/388/ckeditor-helper
* Modifié par Damien Varron, 09/10/2010
*/
class CkHelper extends AppHelper
@damusnet
damusnet / gist:3323622
Created August 11, 2012 10:28 — forked from marcgg/gist:733592
Regex to get the Facebook Page ID from a given URL
<?php
$tests = array(
'http://www.facebook.com/page_id' => 'page_id',
'https://www.facebook.com/page_id' => 'page_id',
'http://www.facebook.com/#!/page_id' => 'page_id',
'http://www.facebook.com/pages/Parisé-France/Vanity-Url/123456?v=app_555' => '123456',
'http://www.facebook.com/pages/Vanity-Url/45678' => '45678',
'http://www.facebook.com/#!/page_with_1_number' => 'page_with_1_number',
'http://www.facebook.com/bounce_page#!/pages/Vanity-Url/45678' => '45678',
'http://www.facebook.com/bounce_page#!/my_page_id?v=app_166292090072334' => 'my_page_id',
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
'use strict';
import React from 'react';
import SwipeViews from 'react-swipe-views';
export default class App extends React.Component {
render() {
return (
<SwipeViews>
<div title="Tab 1">
G15XYZ-B55D-7122-5A7B 04.03.2015 01.05.2015 Disponible Un .XYZ gratuit
G15COMH-9674-D5FA-E122 04.03.2015 01.05.2015 Disponible Un .COM à -50%
G15COMH-5F0A-CA9E-C1A3 04.03.2015 01.05.2015 Disponible Un .COM à -50%
G15FRH-A96D-314D-9CB4 04.03.2015 01.05.2015 Disponible Un .FR à -50%
@damusnet
damusnet / api.js
Last active August 29, 2015 14:20
quizmap
// Détecter le click
// https://developers.google.com/maps/documentation/javascript/events
google.maps.event.addListener(map, 'click', function(event) {
});
// Objet latLng
// https://developers.google.com/maps/documentation/javascript/3.exp/reference#LatLng
latLng = new google.maps.LatLng(
46.2157467,
import React, { Component } from "react";
import { DeviceSizeListener, DeviceSwitch } from "../../src";
const BREAKPOINT = "min-width: 600px";
const example = () => (
<DeviceSizeListener breakpoint={BREAKPOINT}>
<DeviceSwitch
mobileRender="Mobile!"
@damusnet
damusnet / App.jsx
Last active July 7, 2020 03:13
Basic react-test-renderer Click test
const App = () => {
const [counter, setCounter] = React.useState(0)
return (
<div>
You clicked me {counter} times!
<ClickMe counter={counter} setCounter={setCounter} />
</div>
)
}