Skip to content

Instantly share code, notes, and snippets.

Genar Trias Ortiz gtrias

Block or report user

Report or block gtrias

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
sudo gem install --no-user-install sass
gtrias /
Created Nov 3, 2015 — forked from chriswessels/
A guide to setting up self-hosted infrastructure for Meteor applications on Ubuntu Server 13.04.

#Meteor and Self-hosted Infrastructure

Meteor is an eye-opening JavaScript framework that runs on both the client and the server, giving developers a revolutionary take on software engineering. If you are not familiar with Meteor, I urge you to visit their website.

##An overview

In this brief gist, I am going to discuss the process of setting up a server (in my case, a VPS) to host Meteor applications.

My experience with Meteor has been brief, however it has not taken much demonstration for me to realise the significance of this stellar framework. Let's jump right in!

gtrias / AddFulltextIndexesCommand.php
Last active Sep 14, 2015 — forked from ZeBigDuck/AddFulltextIndexesCommand.php
MATCH AGAINST for Doctrine DQL queries
View AddFulltextIndexesCommand.php
# xxx/yyyBundle/Command/AddFulltextIndexesCommand.php
* AddFulltextIndexesCommand.php
* @author Jérémy Hubert <>
* @since lun. 26 sept. 2011 09:23:53
namespace xxx\yyyBundle\Command;
gtrias / routing.yml
Last active Sep 8, 2015 — forked from mikeemoo/routing.yml
Catch all routing symfony2
View routing.yml
pattern: /{url}
defaults: { _controller: LowpressWordpressBundle:Default:index }
url: ".*"
gtrias / handlebars.striptags.js
Last active Aug 29, 2015 — forked from tracend/handlebars.striptags.js
striptags() #handlebars #helper #cc
View handlebars.striptags.js
// This doesn't work for me
Handlebars.registerHelper("striptags", function( txt ){
// exit now if text is undefined
if(typeof txt == "undefined") return;
// the regular expresion
var regexp = new RegExp('#([^\\s]*)','g');
// replacing the text
return txt.replace(regexp, '');
gtrias /
Last active Aug 29, 2015
Git search for files
# Source:
# Search for a file knowing the path
git log --all -- <path-to-file>
# Display the file on that sha
git show <SHA> -- <path-to-file>
# Restore file for that sha
git checkout <SHA> -- <path-to-file>
gtrias /
Last active Aug 29, 2015
Push existing git repository to existing svn repository
# Clone the svn repository
$ git svn clone # Important to clone the trunk folder
$ cd trunk
$ git checkout -b mywork
$ git pull /path/to/current/work/repository/.git master
#Merge and "push"
$ git checkout master
gtrias / sslredirect.conf
Created Jul 28, 2015
Apache redirect to HTTPS
View sslredirect.conf
NameVirtualHost *:80
<VirtualHost *:80>
Redirect permanent /
<VirtualHost _default_:443>
DocumentRoot /usr/local/apache2/htdocs
SSLEngine On
gtrias / cake3ORMMatching.php
Created Jul 27, 2015
Cakephp3 - Retrieve entity based on related entity conditions
View cake3ORMMatching.php
$posts = $this->Posts
You can’t perform that action at this time.