Skip to content

Instantly share code, notes, and snippets.

View CodeIter's full-sized avatar
🍊
Welcome

Muhammad Amin Boubaker CodeIter

🍊
Welcome
View GitHub Profile
@swarminglogic
swarminglogic / watchfile.sh
Last active January 1, 2025 19:07
watchfile - monitor file(s) and execute a command when files are changed
#!/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
----------------------------------------
@gitaarik
gitaarik / git_submodules.md
Last active April 22, 2025 19:46
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

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.
@jewelsea
jewelsea / EarthViewer.java
Created October 28, 2013 22:57
Display the earth in JavaFX 3D
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;
@dwelch2344
dwelch2344 / EndpointServer.java
Created November 29, 2012 18:51
A simple proxy test
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;
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

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:

@m14t
m14t / fix_github_https_repo.sh
Created July 5, 2012 21:57
Convert HTTPS github clones to use SSH
#/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
@jaygooby
jaygooby / git_notes.md
Last active April 2, 2025 13:18
Git, you bloody git
@LouCypher
LouCypher / flickr-plus-one-like.user.js
Created March 21, 2012 00:12
Google +1 userscripts
// ==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==
@LouCypher
LouCypher / show-password-onfocus.user.js
Last active October 21, 2024 18:44
Show Password userscripts
// ==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
@geowa4
geowa4 / install.sh
Created December 3, 2011 21:51
Simple Bash script to download Tomcat 7.0.23 and deploy a WAR.
#!/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