Skip to content

Instantly share code, notes, and snippets.

View alex-moreno's full-sized avatar

Alejandro Moreno alex-moreno

View GitHub Profile
@makmanalp
makmanalp / comparison.md
Last active June 10, 2024 14:24
Angular vs Backbone vs React vs Ember notes

Note: these are pretty rough notes I made for my team on the fly as I was reading through some pages. Some could be mildly inaccurate but hopefully not terribly so. I might resort to convenient fiction & simplification sometimes.

My top contenders, mostly based on popularity / community etc:

  • Angular
  • Backbone
  • React
  • Ember

Mostly about MVC (or derivatives, MVP / MVVM).

@teodyseguin
teodyseguin / get_active_drupal_search_facet
Created January 7, 2015 07:27
How to get the active Search Facets in Drupal
$searchers = facetapi_get_searcher_info();
$activeFacets = array();
foreach ($searchers as $searcher) {
if ($searcher['instance'] == 'default_node_index') {
$defaultSearcher = $searcher['adapter'] . '@' . $searcher['instance'];
}
}
$facetApiAdapter = facetapi_adapter_load($defaultSearcher);
@sharique
sharique / Drush 7 setup
Created November 10, 2014 17:45
Drush 7 setup shell script - run this script as normal user. don't run this as root as this install drush in user's home folder.
#!/bin/sh
cd
mkdir bin
cd bin
echo "In directory"
pwd
php -r "readfile('https://getcomposer.org/installer');" | php
echo "Renaming composer.phar to composer."
mv composer.phar composer
echo "Renaming done."
@mblarsen
mblarsen / deploy.yaml
Last active July 24, 2022 13:27
Solution for `git clone` using Ansible for repos with private submodules with github deploy keys
# Problem:
#
# If you use git submodules linking two private github repos, you'll need to create a separate deploy key for each.
# Multiple keys are not supported by Ansible, nor does ansible (when running git module) resort to your `.ssh/config` file.
# This means your ansible playbook will hang in this case.
#
# You can however use the ansible git module to checkout your repo in multiple steps, like this:
#
- hosts: webserver
vars:
@seanf
seanf / jenkins-ensure-timeout.groovy
Last active September 27, 2022 11:00
Jenkins Groovy script: sets a timeout strategy for any job which doesn't have one
// This script is for Jenkins' Groovy console, and sets a timeout
// strategy for any job which doesn't have one.
// Based on http://janmaterne.wordpress.com/2010/07/11/how-to-check-if-all-hudson-jobs-have-a-timeout/
// Updated and modified by Sean Flanigan.
import hudson.model.*
String describe(strat) {
if (strat instanceof hudson.plugins.build_timeout.impl.ElasticTimeOutStrategy) {
return "Elastic(${strat.timeoutPercentage}, ${strat.numberOfBuilds}, ${strat.timeoutMinutesElasticDefault})"
@Chaser324
Chaser324 / GitHub-Forking.md
Last active July 22, 2025 10:40
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

(function() {
// Do not use this library. This is just a fun example to prove a
// point.
var Bloop = window.Bloop = {};
var mountId = 0;
function newMountId() {
return mountId++;
}
@denji
denji / README.md
Last active February 11, 2025 10:01 — forked from istepanov/gist:3950977
Remove/Backup – settings & cli for macOS (OS X) – DataGrip, AppCode, CLion, Gogland, IntelliJ, PhpStorm, PyCharm, Rider, RubyMine, WebStorm
@trey
trey / hubot-slack-heroku.md
Last active October 25, 2021 03:18
Steps to Install Hubot in Slack using Heroku
@bergantine
bergantine / Readme.md
Last active November 18, 2021 12:11
Vagrant config for Apache + mod_ssi