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/sh | |
# Source: https://stackoverflow.com/questions/9683279/make-the-current-commit-the-only-initial-commit-in-a-git-repository/13102849#13102849 | |
git checkout --orphan newBranch | |
git add -A # Add all files and commit them | |
git commit | |
git branch -D master # Deletes the master branch | |
git branch -m master # Rename the current branch to master | |
git push -f origin master # Force push master branch to github |
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
# Create a new file in your home directory called .gtkrc-eclipse | |
# call eclipse with this command: | |
# Gtk2 forced: | |
# export SWT_GTK3=0 | |
# env GTK2_RC_FILES=/usr/share/themes/<YourTheme>/gtk-2.0/gtkrc:/home/<YourUser>/.gtkrc-eclipse '/path_to_eclipse/eclipse' | |
# In your Eclipse directory find the file 'e4_default_gtk.css' | |
# In this file there's a CSS class: |
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 | |
if dialog=`zenity --window-icon=warning --question --title="Secure Delete" --no-wrap --text="Are you sure you want to securely delete:\n\n $1\n\nand any other files and folders selected? File data will be overwritten and cannot be recovered."` | |
then /usr/bin/srm -fllrv "$@"| zenity --progress --pulsate --text="File deletion in progress..." --title="Secure Delete" --auto-close | |
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
#!/bin/bash | |
url=$1 | |
# Make a HEAD request to the supplied URL | |
code=$(curl $url -s -L -I -o /dev/null -w '%{http_code}') | |
if [ $code != "200" ]; then | |
# Some servers might reject HEAD requests. Downloading 1st byte of the data to get a code | |
code=$(curl --max-filesize 1 $url -s -L -o /dev/null -w '%{http_code}') | |
fi | |
echo $code |
NewerOlder