Skip to content

Instantly share code, notes, and snippets.

View ardianys's full-sized avatar

Ardian Yuli Setyanto ardianys

  • Linguistees
  • Wonogiri, Indonesia
  • X @ardianys
View GitHub Profile
$ rbenv install 2.1.2
ruby-build: definition not found: 2.1.2
You can list all available versions with `rbenv install --list'.
If the version you're looking for is not present, first try upgrading
ruby-build. If it's still missing, open a request on the ruby-build
issue tracker: https://github.com/sstephenson/ruby-build/issues
(Fun fact: Recent versions of ruby-build will give you a more helpful error message which just tells you the following.)
@bryanchriswhite
bryanchriswhite / jshintrc
Created March 15, 2013 17:30
Angular project's .jshintrc file for use with grunt and the jshint plugin.
{
"node" : true,
"browser" : true,
"es5" : true,
"esnext" : true,
"bitwise" : true,
"camelcase": true,
"curly" : true,
"eqeqeq" : true,
"immed" : true,
@gereon
gereon / gist:3049271
Created July 4, 2012 20:04 — forked from Dattaya/1. README.md
Symfony 2.1: How to integrate assetic less filter with lessphp

Symfony2.0.10. How to integrate assetic lessphp filter.

  • Add the following lines of code to the composer.json file:
"leafo/lessphp": "*"
  • Run composer install
@stof
stof / ConfigureMenuEvent.php
Created December 18, 2011 21:03 — forked from immutef/ConfigureMenuEvent.php
MenuBundle EventDispatcher integration
<?php
namespace Turtle\AcpBundle\Event;
use Symfony\Component\EventDispatcher\Event;
use Knp\Menu\ItemInterface;
class ConfigureMenuEvent extends Event
{
/**
@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;
}
@beberlei
beberlei / Document.php
Created May 18, 2011 10:46
My Symfony2 File Upload workflow
<?php
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\HttpFoundation\File\UploadedFile;
/**
* @Entity
*/
class Document
{
@immutef
immutef / ConfigureMenuEvent.php
Created April 30, 2011 09:35
MenuBundle EventDispatcher integration
<?php
namespace Turtle\AcpBundle\Event;
use Symfony\Component\EventDispatcher\Event;
use Knplabs\Bundle\MenuBundle\Menu;
class ConfigureMenuEvent extends Event
{
@pch
pch / watermark.rb
Created January 18, 2011 13:43
Paperclip Watermark processor
class User
has_attached_file :photo,
:processors => [:watermark],
:styles => {
:medium => {
:geometry => "300x300>",
:watermark_path => "#{Rails.root}/public/images/watermark.png"
},
:thumb => "100x100>",
}