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
function hideAddressBar() | |
{ | |
if(!window.location.hash) | |
{ | |
if(document.height < window.outerHeight) | |
{ | |
document.body.style.height = (window.outerHeight + 50) + 'px'; | |
} | |
setTimeout( function(){ window.scrollTo(0, 1); }, 50 ); |
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 [ ! -z "$1" ] | |
then | |
PREFIX=$1 | |
else | |
echo "Enter the filename prefix:" | |
read PREFIX | |
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
javascript:var tab = RegExp("\\t", "g"); | |
document.getElementById("content").value = | |
document.getElementById("content").value.replace(tab,' '); |
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 is a simple demo showing | |
# how to color output from a bash script. | |
green='\e[0;32m' | |
red='\e[0;31m' | |
NC='\e[0m' #No Color | |
echo -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
# Example Vagrantfile customizations from older | |
# config before "private_network" was supported. | |
# Typically no need to do this manually anymore. | |
v.customize ["hostonlyif", "ipconfig", "vboxnet0", "--ip", "192.168.33.1", "--netmask", "255.255.255.0"] | |
v.customize ["modifyvm", :id, "--nic1", "nat"] | |
v.customize ["modifyvm", :id, "--nic2", "hostonly"] | |
v.customize ["modifyvm", :id, "--hostonlyadapter2", "vboxnet0"] |
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
" Customize font. I like Source Code Pro | |
" URL - http://www.google.com/fonts/specimen/Source+Code+Pro | |
" But sometimes use Anonymous Pro | |
" URL - https://www.google.com/fonts/specimen/Anonymous+Pro | |
set guifont=Source\ Code\ Pro:h16 | |
" Disable cursor blinking | |
set gcr=n:blinkon0 | |
" Enable the Solarized Theme |
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
" My ~/.vimrc is quite minimal as everything | |
" is inherited from Vim Boilerplate. | |
" Enable Vim Boilerplate Shortcuts | |
autocmd VimEnter * :call VBPShortcuts() |
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
- name: Check if SELinux is running | |
command: getenforce | |
register: sestatus | |
changed_when: false | |
tags: selinux |
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
rpm -qa --qf '%{INSTALLTIME} (%{INSTALLTIME:date}): %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' |
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
# Return the number of cores on a Mac OS machine | |
sysctl -n hw.ncpu | |
# This also works | |
sysctl hw.ncpu | awk '{print $2}' |
OlderNewer