This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Creates an alias called "git hist" that outputs a nicely formatted git log. | |
# Usage is just like "git log" | |
# Examples: | |
# git hist | |
# git hist -5 | |
# git hist <branch_name> | |
# git hist <tag_name> -10 | |
## | |
git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
flip_last_branch_name=ongoing-flip-last; | |
git rev-parse --verify $flip_last_branch_name > /dev/null 2>&1; | |
res=$?; | |
if [ "$res" = "0" ]; then | |
echo "An ongoing flip-last is already in progress ($res) ... execute following command to remove it : git branch -D $flip_last_branch_name"; | |
exit -1; | |
fi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Allows WP_Query to use a 'since' argument to query for | |
* relative date queries. | |
* | |
* Usage: Query posts from last 30 days | |
* $query = new WP_Query('since' => '-30 days'); | |
* | |
* @uses strtotime() | |
* @author Eddie Moya |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Git Unremove ## | |
# Adds an alias called "unrm" to retrieve a pile or path deleted at any point in the repositories history. | |
# Usage: | |
# git unrm [path] | |
# git unrm path/to/file | |
git config --global alias.unrm '!COMMIT=$(git log -1 --pretty=%h -- "$1"); git checkout $COMMIT^ -- "$1"; echo "File: $1, was restored from commit $COMMIT"; git show -s $COMMIT' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function actual_path() { | |
if [ [ -z "$1" ] -a [ -d $1 ] ]; then | |
echo $(cd $1 && test `pwd` = `pwd -P`) | |
return 0 | |
else | |
return 1 | |
fi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Function GetBrighterPlanetApiKey() | |
GetBrighterPlanetApiKey = ActiveWorkbook.Worksheets("Setup").Range("C2").Value | |
End Function | |
Function IsEmissionEstimateServiceOnline() | |
If LCase(ActiveWorkbook.Worksheets("Setup").Range("C3").Value) = "online" And ThisWorkbook.HasFinishedWorkbookOpen() = True Then | |
IsEmissionEstimateServiceOnline = True | |
Else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /* | |
Plugin Name: Boilerplate Widget | |
Description: Starting point for building widgets quickly and easier | |
Version: 1.0 | |
Author: Eddie Moya | |
/** | |
* IMPORTANT: Change the class name for each widget | |
*/ | |
class Boilerplate_Widget extends WP_Widget { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
branch=$(git name-rev --name-only HEAD) | |
git rebase --onto HEAD~2 HEAD~1 HEAD | |
git cherry-pick ORIG_HEAD~1 | |
git update-ref refs/heads/$branch $(git rev-parse HEAD) | |
git checkout --quiet $branch | |
# Instead of creating an independant bash script with the code above, | |
# consider simply creating a git alias using the command below. |
NewerOlder