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 | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
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
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |
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
BASE_PATH="/srv/www" | |
REPO_PATH="/srv/www/repo" | |
GIT_URL="https://github.com/username/repo.git" | |
if [ -d "$REPO_PATH" ]; then | |
cd $REPO_PATH | |
git pull --quiet | |
echo "git pull successfully ran ($(git rev-parse --short HEAD))"; | |
else | |
cd $BASE_PATH |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<!doctype html> | |
<html class="no-js" lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- <link rel="icon" href="/favicon.ico"> --> | |
<!-- Latest compiled and minified CSS --> |
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
// detect IE | |
var IEversion = detectIE(); | |
if (IEversion !== false) { | |
// document.getElementById('result').innerHTML = 'IE ' + IEversion; | |
document.getElementsByTagName("body")[0].classList.add("ie"); | |
document.getElementsByTagName("body")[0].classList.add("ie" + IEversion); | |
} else { | |
// document.getElementById('result').innerHTML = 'NOT IE'; | |
} |
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
monitorEvents(document.body); // logs all events on the body | |
monitorEvents(document.body, 'mouse'); // logs mouse events on the body | |
monitorEvents(document.body.querySelectorAll('input')); // logs all events on inputs | |
$('a').on("click mousedown mouseup focus blur keydown change mouseup click dblclick mousemove mouseover mouseout mousewheel keydown keyup keypress textInput touchstart touchmove touchend touchcancel resize scroll zoom focus blur select change submit reset",function(e){ | |
console.log(e); | |
}); |
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
window.location.origin = window.location.origin || window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: ''); |
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
$(document).ready(function () { | |
var idleState = false; | |
var idleTimer = null; | |
$('*').bind('mousemove click mouseup mousedown keydown keypress keyup submit change mouseenter scroll resize dblclick', function () { | |
clearTimeout(idleTimer); | |
if (idleState === true) { | |
$("body").css('background-color','#fff'); | |
} | |
idleState = false; | |
idleTimer = setTimeout(function () { |
OlderNewer