Skip to content

Instantly share code, notes, and snippets.

@eddiemoya
eddiemoya / git-rebase.sh
Last active August 5, 2022 15:58
Checks to see if the given branch is fast-forward-mergable with the given base. If not, it attempts to rebase the branch. If any conflicts arise, the rebase is aborted and the script exists with non-zero status.
#!/bin/bash
underline=$(tput sgr 0 1) # Underline
bold=$(tput bold) # Bold
normal=$(tput rmso) # Normal
# Dims
red=$(tput setaf 1) # red
green=$(tput setaf 2) # magenta
blue=$(tput setaf 4) # blue
@eddiemoya
eddiemoya / iitc-export-import-draw.js
Created February 2, 2016 21:18 — forked from svebal/iitc-export-import-draw.js
Plugin for IITC - let you im- / export your sketches from drawing tools
// ==UserScript==
// @id iitc-export-import-draw@skamander
// @name IITC plugin: export and import data from draw tools
// @version 0.0.1
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @description Import/Export Data from draw tools
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
// @match http://www.ingress.com/intel*
@eddiemoya
eddiemoya / gist:367031a5f3ba14385164
Created August 4, 2015 16:19
Weird config layout
conf/app1/nginx.conf
conf/app1/included-file.conf
conf/app1/other-included-file.conf
conf/app2/nginx.conf
conf/app2/included-file.conf
conf/app2/other-included-file.conf
conf/app3/nginx.conf
conf/app3/included-file.conf
@eddiemoya
eddiemoya / ucr-ingress.com-mobile.css
Last active August 29, 2015 14:17
Fix mobile layout bug on ucr-ingress.com
/* All Smartphones in portrait and landscape ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
#join_ucr {
text-align: center;
position : fixed;
font-size: 0px;
font-weight: bold;
padding-top: 0;
@eddiemoya
eddiemoya / git-merge-ff-only.sh
Last active May 19, 2017 18:11
Fast forward merges one branch into another without having to checkout either - fails if the second parameter is not fast-forwardable.
#!/bin/bash
# usage:
# git-merge-ff-only.sh master develop
# Will only merge develop into master if its fast-forwardable.
merge_into=$1;
merge_from=$2;
@eddiemoya
eddiemoya / gist:24ea52b5487c11a0c7d9
Last active August 29, 2015 14:02
Open PDP JIRAs from the command line..
# To use this, open ~/.bash_profile, and add the function below.
# Then run . ~/.bash_profile to reload your profile.
# Usage: pdp <jira_number>
pdp() { open -a "Google Chrome" https://obujira.searshc.com/jira/browse/PDP-$1; }
@eddiemoya
eddiemoya / git-jira.sh
Last active August 29, 2015 14:01
Uses JIRA API to create releases, squash merge branches with JIRA ID, title, and priority in the commit message.
#!/bin/sh
## Installation ##
# > git clone https://gist.github.com/1367d0aae9e059a57ebf.git ~/git-jira.sh
# > git config --global alias.jira '!. ~/git-jira.sh'
##
## Commands ##
#
@eddiemoya
eddiemoya / git-ffable.sh
Created April 23, 2014 17:37
Bash script that checks if a branch is fast-forwardable, and it its not offers to rebase it for you. Once rebased, the script asks before ff merging.
#!/bin/bash
underline=$(tput sgr 0 1) # Underline
bold=$(tput bold) # Bold
normal=$(tput rmso) # Normal
# Dims
red=$(tput setaf 1) # red
green=$(tput setaf 2) # magenta
blue=$(tput setaf 4) # blue
<?php
/*
* A walker class to use that extends wp_dropdown_categories and allows it to use the term's slug as a value rather than ID.
*
* See http://core.trac.wordpress.org/ticket/13258
*
* Usage, as normal:
* wp_dropdown_categories($args);
*
@eddiemoya
eddiemoya / git-smarter-example-git-checkout-path.sh
Created March 24, 2014 23:01
Example of using "git checkout" with path. For oembed use on http://eddiemoya.com
# Recreate the file at path/to/file in the state in the state it was at
# just prior to having been deleted (made up commit hash for example)
git checkout 4efa6b0^ -- path/to/file