Skip to content

Instantly share code, notes, and snippets.

View chalasr's full-sized avatar

Robin Chalas chalasr

View GitHub Profile
chalasr /
Last active August 29, 2015 14:19
ImageResizing : light and simple script for jpg/png images resizing


Light and simple script made for resize all images presents in current folder and recursively. Work on JPEG and PNG images (mixed or not).


  • Copy the code and paste it in imgResize.php file or download it.
  • Place the file into your image(s) folder (You can have many image(s) folders into).
chalasr / Personne.php
Last active August 29, 2015 14:27
How make an auto-completed field for filter entity results in list view, using entity property (not related entity) ?
namespace Application\PersonneBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
* Personne
* @ORM\Table()
chalasr / ApplicationPersonneBundle:CRUD:list.html.twig
Last active March 24, 2022 11:23
Autocompletion AJAX for SonataAdminBundle $datagridMapper filters
{% extends 'SonataAdminBundle:CRUD:base_list.html.twig' %}
{% block javascripts %}
{{ parent() }}
<script type="text/javascript">
var MIN_LENGTH = 3;
var datalistFirst = $('<ul class="select2-results autoResults" role="listbox" id="datalist_filter_firstname_value"></ul>');
var datalistName = $('<ul class="select2-results autoResults" role="listbox" id="datalist_filter_name_value"></ul>');
This file has been truncated, but you can view the full file.
<!DOCTYPE html><html lang="en" ng-app="weedmaps"><head><meta charset="utf-8" /><meta content="IE=Edge,chrome=1" http-equiv="X-UA-Compatible" />
<script type="text/javascript">window.NREUM||(NREUM={});{"beacon":"","errorBeacon":"","licenseKey":"c4a111e7e0","applicationID":"2014141","transactionName":"cVYMRBBdWQ1TFk4HAV5QFFUQW1ASGRcJDBM=","queueTime":4,"applicationTime":627,"ttGuid":"","agentToken":null,"agent":""}</script>
<script type="text/javascript">(window.NREUM||(NREUM={})).loader_config={xpid:"UgMDUFJACgMBUFBWBg=="};window.NREUM||(NREUM={}),__nr_require=function(t,e,n){function r(n){if(!e[n]){var o=e[n]={exports:{}};t[n][0].call(o.exports,function(e){var o=t[n][1][e];return r(o?o:e)},o,o.exports)}return e[n].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<n.length;o++)r(n[o]);return r}({QJf3ax:[function(t,e){function n(t){function e(e,n,a){t&&t(e,n,a),a||(a={});for(var c=s(e),f=c.length,u=i(a,o,r),d=
chalasr /
Last active October 15, 2023 11:44 — forked from jbenet/
a simple git branching model

a simple git branching model

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

server {
listen 80;
root /var/www/nginx;
index index.php index.html index.htm;
client_max_body_size 1000M; # set maximum upload size
# default try order
location / {
try_files $uri $uri/ @webdav;
chalasr /
Created October 13, 2015 15:27
Configure Apple keyboard on Ubuntu 14.04
chalasr / Capfile
Last active September 23, 2018 15:58
Deploy using capistrano/symfony tasks
# Load DSL and set up stages
require 'capistrano/setup'
# Include default deployment tasks
require 'capistrano/deploy'
require 'capistrano/composer'
require 'capistrano/symfony'
chalasr / sportroops.conf
Last active December 9, 2015 20:01
Apache2 VHOST example for sportroops local environment (dev)
<VirtualHost *:80>
DocumentRoot /var/www/html/sutunam/sportroops/web/
<Directory "/var/www/html/sutunam/sportroops/web">
AllowOverride All
Order allow,deny
Allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
chalasr / security.yml
Created December 11, 2015 17:14
Lexik\JWTAuthenticationBundle configuration
memory: ~
id: fos_user.user_manager
FOS\UserBundle\Model\UserInterface: sha512