In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
#!/bin/bash | |
version=1.0.1 | |
versionDate="2014-02-14" | |
function showHelp() { | |
echo "watchfile - monitor file(s)/command and perform action when changed | |
Possible ways of usage | |
---------------------------------------- |
import javafx.animation.*; | |
import javafx.application.Application; | |
import javafx.scene.*; | |
import javafx.scene.image.Image; | |
import javafx.scene.layout.StackPane; | |
import javafx.scene.paint.*; | |
import javafx.scene.shape.Sphere; | |
import javafx.scene.transform.Rotate; | |
import javafx.stage.Stage; | |
import javafx.util.Duration; |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import javax.servlet.Servlet; | |
import javax.servlet.ServletConfig; | |
import javax.servlet.ServletException; | |
import javax.servlet.ServletRequest; | |
import javax.servlet.ServletResponse; | |
import javax.servlet.http.HttpServletRequest; |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
#/bin/bash | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
if [ -z "$REPO_URL" ]; then | |
echo "-- ERROR: Could not identify Repo url." | |
echo " It is possible this repo is already using SSH instead of HTTPS." | |
exit | |
fi |
git lb
31 minutes ago: fun-branch
2 days ago: remove-things
3 days ago: staging
6 days ago: remove-bugs
Courtesy of https://ses4j.github.io/2020/04/01/git-alias-recent-branches/
// ==UserScript== | |
// @name Flickr Plus One Like | |
// @namespace http://mozilla.status.net/loucypher | |
// @description Add Google+1 and Facebook Like buttons | |
// @author LouCypher | |
// @license free | |
// @match *://*.flickr.com/photos/* | |
// @include http://www.flickr.com/photos/* | |
// @include https://secure.flickr.com/photos/* | |
// ==/UserScript== |
// ==UserScript== | |
// @name Show Password onFocus | |
// @namespace http://zoolcar9.lhukie.net/ | |
// @description Show password when focus on password field | |
// @version 20130114.01 | |
// @author LouCypher | |
// @license free | |
// @homepageURL http://userscripts.org/scripts/show/1892 | |
// @updateURL https://gist.github.com/raw/1870154/show-password-onfocus.user.js | |
// @downloadURL https://gist.github.com/raw/1870154/show-password-onfocus.user.js |
#!/bin/bash | |
TOMCAT=apache-tomcat-7.0.23 | |
TOMCAT_WEBAPPS=$TOMCAT/webapps | |
TOMCAT_CONFIG=$TOMCAT/conf/server.xml | |
TOMCAT_START=$TOMCAT/bin/startup.sh | |
TOMCAT_ARCHIVE=$TOMCAT.tar.gz | |
TOMCAT_URL=http://apache.mirrorcatalogs.com/tomcat/tomcat-7/v7.0.23/bin/$TOMCAT_ARCHIVE | |
WAR_FILE=whatever.war |