Skip to content

Instantly share code, notes, and snippets.

View chalasr's full-sized avatar

Robin Chalas chalasr

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

imageResize

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

#Use

  • 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
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) ?
<?php
namespace Application\PersonneBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Personne
*
* @ORM\Table()
@chalasr
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">
$(document).ready(function(){
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>');
$('#filter_name_value').after(datalistName);
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={});NREUM.info={"beacon":"bam.nr-data.net","errorBeacon":"bam.nr-data.net","licenseKey":"c4a111e7e0","applicationID":"2014141","transactionName":"cVYMRBBdWQ1TFk4HAV5QFFUQW1ASGRcJDBM=","queueTime":4,"applicationTime":627,"ttGuid":"","agentToken":null,"agent":"js-agent.newrelic.com/nr-686.min.js"}</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
chalasr / simple-git-branching-model.md
Last active October 15, 2023 11:44 — forked from jbenet/simple-git-branching-model.md
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;
server_name 192.168.1.16;
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
chalasr / README.md
Created October 13, 2015 15:27
Configure Apple keyboard on Ubuntu 14.04
@chalasr
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
chalasr / sportroops.conf
Last active December 9, 2015 20:01
Apache2 VHOST example for sportroops local environment (dev)
<VirtualHost *:80>
ServerName sportroops.dev
ServerAlias api.sportroops.dev
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
chalasr / security.yml
Created December 11, 2015 17:14
Lexik\JWTAuthenticationBundle configuration
security:
providers:
in_memory:
memory: ~
fos_userbundle:
id: fos_user.user_manager
encoders:
FOS\UserBundle\Model\UserInterface: sha512