This file contains hidden or 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 | |
# | |
# Save in your .bash_profile then: isreg domain.com | |
function isreg { | |
dig soa $1 | grep -q ^$1 && echo "Yes" || echo "No" | |
} |
This file contains hidden or 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
#! /usr/bin/env ruby | |
# | |
# Save in your path as "isreg" and chmod +x. Then: isreg domain.com | |
# | |
puts `whois #{ARGV[0]}` =~ /No match for \"#{ARGV[0]}\"/mi ? "No" : "Yes" |
This file contains hidden or 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
$localServers = array('something.dev'); | |
$stagingServers = array('something_else.com', 'and_another.com'); | |
if (in_array($_SERVER['HTTP_HOST'], $localServers)) { | |
// Development settings | |
} elseif (in_array($_SERVER['HTTP_HOST'], $stagingServers)) { | |
// Staging settings | |
} else { | |
// Production settings | |
} |
NewerOlder