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 bash | |
v=`whois $1 | grep match | wc | awk '{print $1}'` | |
if [ $v = 0 ]; | |
then | |
echo "$1 is taken" | |
else | |
echo "I don't know if $1 is taken" | |
fi |
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 bash | |
reg=`echo $1 | nc whois.verisign-grs.com 43 | grep "Registrar WHOIS" | awk '{print $4}' | sed -e 's/.$//'` | |
emails=$(echo "$1" | nc $reg 43 | grep "@" | awk '{print $NF}') | |
list=$1 | |
for i in $emails | |
do |
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
sudo apt-get update && \\ | |
sudo apt-get upgrade -y && \\ | |
sudo apt-get dist-upgrade -y && \\ | |
sudo apt-get autoremove -y && \\ | |
sudo apt-get autoclean -y && \\ | |
sudo apt-get clean -y | |
sudo deborphan | xargs sudo apt-get -y remove --purge | |
dpkg -l |grep -i ^rc | cut -d " " -f 3 | xargs sudo dpkg --purge |
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
/** | |
* Linear regression in Javascript for domains value | |
* 2016, Antonio Villamarin | |
* | |
* github.com/anvius | |
* @anvius | |
* | |
* License GPL | |
* | |
* Clean code === No Comments |
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
<?php | |
// FROM: http://stackoverflow.com/a/6319265 | |
function renderString($str, $parms) | |
{ | |
// if | |
$str = preg_replace_callback('/{{if (?P<name>\w+)}}(?P<inner>.*?){{endif}}/is', function($match) use ($parms) { | |
if( isset($parms[$match['name']])) { | |
// recursive | |
return renderString($match['inner'], $parms); |
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
<?php | |
// From StackOverflow | |
function file_get_contents_curl($url, $referer="") { | |
$header_list = array( | |
'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7', | |
'Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', | |
'Accept-Language: en-US,en;q=0.8' | |
); |
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
<?php | |
$user = new AdWordsUser(); | |
$user->LogDefaults(); | |
$targetingIdeaService = $user->GetService('TargetingIdeaService', 'v201402'); | |
$keyword = 'mars cruise'; | |
$selector = new TargetingIdeaSelector(); | |
$selector->requestType = 'STATS'; | |
$selector->ideaType = 'KEYWORD'; | |
$selector->requestedAttributeTypes = array('COMPETITION'); |
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
<?php | |
require "thread.php"; | |
function doSomething($res, $t) { | |
usleep($t); | |
exit($res); | |
} | |
$thread1 = new Thread('doSomething'); |