Skip to content

Instantly share code, notes, and snippets.

Carlos Rodriguez carlosrodriguez

Block or report user

Report or block carlosrodriguez

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
carlosrodriguez / Jenkinsfile
Created Mar 8, 2019 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage concurrency constraints, ...
View Jenkinsfile
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
Please make sure to add the following environment variables:
HEROKU_PREVIEW=<your heroku preview app>
HEROKU_PREPRODUCTION=<your heroku pre-production app>
HEROKU_PRODUCTION=<your heroku production app>
carlosrodriguez / post-merge
Created Oct 19, 2017 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
View post-merge
#!/usr/bin/env bash
# MIT © Sindre Sorhus -
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
carlosrodriguez / gist:9d8cd2ec46f31802cd76a2d0f59a0a80
Created Aug 15, 2017 — forked from francoishill/gist:6483997
Media queries for mobile devices - Requires at least requires the meta viewport tag with content 'width=device-width'
View gist:9d8cd2ec46f31802cd76a2d0f59a0a80
/*At least requires the meta viewport tag with content 'width=device-width'*/
@media only screen and (max-width: 1080px) and (orientation : portrait) {
Windows Surface Pro*/
@media only screen and (max-width: 800px) and (orientation : portrait) {
Acer Iconia Tab A100
carlosrodriguez / 0_reuse_code.js
Created Jul 22, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View wp-query-ref.php
* WordPress Query Comprehensive Reference
* Compiled by luetkemj -
* Source:
$args = array(
View capybara cheat sheet
=Clicking links and buttons=
click_link('Link Text')
click('Link Text') # Click either a link or a button
click('Button Value')
View gist:3801806
info: Creating snapshot 0.1.0-8
info: Updating app debugger
info: Activating snapshot 0.1.0-8 for debugger
info: Starting app debugger
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
warn: Error returned from Nodejitsu
error: Error: connect ECONNREFUSED
error: at errnoException (net.js:769:11)
error: at Object.afterConnect [as oncomplete] (net.js:760:19)
carlosrodriguez / meteor
Created Aug 26, 2012
Meteor Method Call
View meteor
// Server
foo: function() {
return 1;
bar: function(arg) {
return "test";
carlosrodriguez / gist:3105375
Created Jul 13, 2012 — forked from alexschwartz/gist:912787
Ask Jenkins via json using jquery
View gist:3105375
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Seitenr?nder - marginwidth, marginheight, topmargin, leftmargin</title>
<script src="" type="text/javascript"></script>
<script type="text/javascript">
var baseUrl;
carlosrodriguez /
Created Nov 16, 2011 — forked from cowboy/
Simple jQuery (1.5+) AJAX Mocking (requires JSON, tested in jQuery 1.7))
* Simple jQuery (1.5+) AJAX Mocking - v0.1pre - 11/16/2011
* Copyright (c) 2011 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
(function($) {
You can’t perform that action at this time.