Skip to content

Instantly share code, notes, and snippets.

View CodeIter's full-sized avatar
🍊
Welcome

Muhammad Amin Boubaker CodeIter

🍊
Welcome
View GitHub Profile
@gaubert
gaubert / .lftp.mockup.rc
Created February 11, 2011 08:56
~/.lftp.rc parameters detailed
########## SETTINGS
# On startup, lftp executes ~/.lftprc and ~/.lftp/rc. You can place aliases and 'set' commands
# there. Some people prefer to see full protocol debug, use 'debug' to turn the debug on.
# Certain commands and settings take a time interval parameter. It has the format Nx[Nx...], where N is time amount
# (floating point) and x is time unit: d - days, h - hours, m - minutes, s - seconds. Default unit is second. E.g.
# 5h30m or 5.5h. Also the interval can be 'infinity', 'inf', 'never', 'forever' - it means infinite interval. E.g.
# 'sleep forever' or 'set dns:cache-expire never'.
@pklaus
pklaus / clearRAM.sh
Last active January 8, 2024 08:00
A Script to Clear Cached RAM on Linux
#!/bin/bash
## Bash Script to clear cached memory on (Ubuntu/Debian) Linux
## By Philipp Klaus
## see <http://blog.philippklaus.de/2011/02/clear-cached-memory-on-ubuntu/>
if [ "$(whoami)" != "root" ]
then
echo "You have to run this script as Superuser!"
exit 1
fi
@aimakun
aimakun / fb-scan-spam-tag.user.js
Created May 16, 2011 07:30
[Userscript] Facebook Scan Mass Tagging
// ==UserScript==
// @name Facebook Scan Mass Tagging (spam/ads tag)
// @namespace http://aimakun.exteen.com
// @description Pure javascript for scan tagging which you should not want them.
// @author aimakun
// @include http*://www.facebook.com
// @include http*://www.facebook.com/
// @include http*://www.facebook.com/?*
// @include http*://www.facebook.com/profile.php?*
// @include http*://www.facebook.com/ajax/home/feed.php?*
@rbialek
rbialek / config
Created June 7, 2011 13:32
ssh/.config
Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile /home/user/.ssh/id_rsa
@fxthomas
fxthomas / lftp.conf
Created June 16, 2011 23:51
Lftp Configuration
## some useful aliases
alias ls "ls -h"
alias dir ls
alias less more
alias zless zmore
alias bzless bzmore
alias mirror "mirror -v"
alias sync "mirror -R -v -n"
alias reconnect "close; cache flush; cd ."
alias edit "eval -f \"get $0 -o ~/.lftp/edit.tmp.$$ && shell \\\"cp -p ~/.lftp/edit.tmp.$$ ~/.lftp/edit.tmp.$$.orig && $EDITOR ~/.lftp/edit.tmp.$$ && test ~/.lftp/edit.tmp.$$ -nt ~/.lftp/edit.tmp.$$.orig\\\" && put ~/.lftp/edit.tmp.$$ -o $0; shell rm -f ~/.lftp/edit.tmp.$$*\""
@vasilisvg
vasilisvg / google-plus-userscript.js
Created July 14, 2011 08:53
Google+ unread messages userscript
// This script shows a badge with the number of new messages in the dock of your Fluid instance of Google+
// The count is reset when you click somewhere in the body
// This version of the script is written by Mathias Bynens
(function(window, document) {
var nodeList = document.getElementsByClassName('a-b-f-i a-f-i'), // live NodeList
fluid = window.fluid,
length;
@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
@LouCypher
LouCypher / show-password-onfocus.user.js
Last active August 18, 2019 10:16
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
@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==
@jaygooby
jaygooby / git_notes.md
Last active June 25, 2024 11:26
Git, you bloody git

Overwrite untracked files in current branch from a remote branch

In a similar vein to git reset --hard feature/weavils you can just overwrite untracked working files (typically left over from branch experiments) which are part of the remote branch you're pulling like this:

git reset --hard origin/feature/weavils

Normally, if you tried git checkout feature/weavils you'd get warnings like untracked working tree files would be overwritten by merge, so hit them with the --hard hammer instead.

(Found via https://stackoverflow.com/q/17404316/391826 and one of the answers: https://stackoverflow.com/a/36824493/391826)