- Background: (46, 46, 46); #2e2e2e
- Comments: (121, 121, 121); #797979
- White: (214, 214, 214); #d6d6d6
- Yellow: (229, 181, 103); #e5b567
- Green: (180, 210, 115); #b4d273
- Orange: (232, 125, 62); #e87d3e
- Purple: (158, 134, 200); #9e86c8
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
// Given a query string "?to=email&why=because&first=John&Last=smith" | |
// getUrlVar("to") will return "email" | |
// getUrlVar("last") will return "smith" | |
// 'unescape' is now deprecated for security reasons, so it is replaced here by decodeURIComponent | |
// MDN proof: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/unescape | |
// Slightly more concise and improved version based on http://www.jquery4u.com/snippets/url-parameters-jquery/ | |
function getUrlVar(key){ | |
var result = new RegExp(key + '=([^&]*)', 'i').exec(window.location.search); | |
return result && decodeURIComponent( result[ 1 ] ) || ''; |
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
/** | |
* Sends an HTML snippet to the W3C validator and returns the result as JSON. | |
* @param string $html HTML code | |
* @return string | |
* @link https://github.com/validator/validator/wiki/Service:-Input:-POST-body | |
* @link https://gist.github.com/tap52384/60cc27fd0a76869cc38b#file-php_html_validator-php | |
*/ | |
public static function validateHtml($html = '') | |
{ | |
$default = array( |
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
<?php | |
/************************************************************************* | |
php easy :: whois lookup script | |
========================================================================== | |
Author: php easy code, www.phpeasycode.com | |
Web Site: http://www.phpeasycode.com | |
Contact: webmaster@phpeasycode.com | |
*************************************************************************/ | |
$domain = $_GET['domain']; |
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 | |
APACHE_CONF=/usr/local/etc/httpd/httpd.conf | |
# Checks whether Homebrew is installed or not | |
function checkBrew { | |
installed brew | |
BREW_INSTALLED=$? | |
} |
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
[user] | |
name = name | |
email = email | |
[core] | |
excludesfile = /Users/username/.gitignore_global | |
autocrlf = input | |
[difftool "sourcetree"] | |
cmd = opendiff \"$LOCAL\" \"$REMOTE\" | |
path = | |
[mergetool "sourcetree"] |
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
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
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
-- See what has access to a particular table (direct and inherited): | |
select Grantee,'Granted Through Role' as Grant_Type, role, table_name | |
from role_tab_privs rtp, dba_role_privs drp | |
where rtp.role = drp.granted_role | |
and table_name = :tablename | |
union | |
select Grantee,'Direct Grant' as Grant_type, null as role, table_name | |
from dba_tab_privs | |
where table_name = :tablename; |
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
<?php | |
/** | |
* Time unit defaults to seconds to follow the example shown here: | |
* http://mitan.co.uk/erlang/elgcmath.htm | |
* exp calculates e to some specified exponent: | |
* https://secure.php.net/manual/en/function.exp.php | |
* factorial function for php: | |
* http://www.hackingwithphp.com/4/18/0/recursive-functions | |
* Basically, all calculated values are private. |
directions for getting windows 10 to work with virtualbox 5.2 based on this page
OlderNewer