Skip to content

Instantly share code, notes, and snippets.

View arsisakarn's full-sized avatar

Arsisakarn S. arsisakarn

  • Sourcecode Co., Ltd.
  • Bangkok, Thailand
View GitHub Profile
@arsisakarn
arsisakarn / gist:1450450
Last active June 4, 2018 18:05
Symfony 2 set and read cookie
<?php
public function testSetCookieAction()
{
$value = '12345';
$html = '<html><body>test set cookie varName =' . $value . '</body></html>';
$response = new Response($html);
$response->headers->setCookie(new Cookie('varName', $value, time() + (3600 * 48)));
return $response;
}
@arsisakarn
arsisakarn / gist:6128411
Last active December 20, 2015 12:09
jeditable textarea handle \n <br>
$(document).ready(function() {
$('.edit_area').editable('/th/ipad/memo-update', {
type: 'textarea',
cancel: 'Cancel',
submit: 'Save',
indicator: 'Saving...',
tooltip: 'Click to edit...',
style: 'inherit',
cssclass: 'editable',
callback: function(value,settings) {