Skip to content

Instantly share code, notes, and snippets.

View magnetikonline's full-sized avatar
💡
I have an idea!

Peter Mescalchin magnetikonline

💡
I have an idea!
View GitHub Profile
@magnetikonline
magnetikonline / README.md
Last active December 15, 2015 01:59
GNU Screen cheatsheet.

GNU Screen cheatsheet

Starting up
List running sessions $ screen -ls
@magnetikonline
magnetikonline / gist:5186527
Created March 18, 2013 11:17
Webalizer IgnoreAgent/SearchEngine rule sets conf - 2013-03
IgnoreAgent Aboundex/*
IgnoreAgent AdsBot-Google*
IgnoreAgent Aghaven/*
IgnoreAgent Alltop/*
IgnoreAgent AppEngine-Google*
IgnoreAgent Apple-PubSub/*
IgnoreAgent AppleSyndication/*
IgnoreAgent BacklinkCrawler*
IgnoreAgent Baiduspider*
IgnoreAgent bitlybot
@magnetikonline
magnetikonline / wgetdownloadcomplete.sh
Created March 20, 2013 02:32
Download complete website using wget.
#!/bin/bash
if [ -z "$1" -o -z "$2" ]; then
echo "Usage: $0 [domain] [path]"
exit
fi
wget \
--domains $1 \
--html-extension \
@magnetikonline
magnetikonline / LineEndings.sublime-settings
Last active October 20, 2021 18:18
Sublime Text 3 - Display file line ending details in status bar.
{
// To show line endings type on status bar
"show_line_endings_on_status_bar": true,
// show an alert when the line ending is on the list
// eg: "alert_when_line_ending_is": ["Windows","Unix","CR"]
"alert_when_line_ending_is": ["Windows"],
// auto convert line endings on file open
"auto_convert_line_endings_to": "Unix"
@magnetikonline
magnetikonline / domready.js
Last active September 7, 2023 23:29
My standalone cross browser "DOM is ready" function.
// Standalone DOM ready utility function
// Parts lifted from the following places:
// https://code.jquery.com/jquery-1.9.1.js
// https://github.com/ded/domready/blob/master/ready.js
// usage:
// domReady(function() { console.log('DOM is ready!'); });
// domReady(function() { console.log('Another method called upon DOM being ready'); });
(function(win,doc) {
@magnetikonline
magnetikonline / README.md
Last active March 14, 2024 22:48
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@magnetikonline
magnetikonline / README.md
Last active February 8, 2024 03:35
Bash if expressions cheatsheet.
@magnetikonline
magnetikonline / optexamples.js
Last active December 15, 2015 15:39
Google Closure JavaScript compiler optimization examples.
// a statement like this...
if (fruit == 'apples') fruit = 'bananas';
// is converted to this...
'apples'==fruit&&(fruit='bananas');
// next... a statement like this...
if (fruit !== undefined) callMe();
@magnetikonline
magnetikonline / README.md
Last active September 9, 2018 05:38
VirtualBox hard disk image tools.

VirtualBox hard disk image tools

Some handy commands to clone/modify existing vdi disk images.

Clone VDI disk image

Note: The disk in question must already be associated to VirtualBox.

vboxmanage clonevdi source.vdi target.vdi
@magnetikonline
magnetikonline / sublimetextupdategitpackages.sh
Last active December 16, 2015 09:59
Update Sublime Text 3/2 packages installed via Git repositories (e.g. GitHub).
#!/bin/bash
SUBLIME_CONFIG_DIR=~/.config/sublime-text-3
find "$SUBLIME_CONFIG_DIR" -type d -name ".git" | while read -r gitRepoDir
do
gitRepoDir=$(echo $gitRepoDir | sed -e "s/\/\.git$//")
echo
echo $gitRepoDir