Skip to content

Instantly share code, notes, and snippets.

View nch7's full-sized avatar

Nick Chikovani nch7

View GitHub Profile
File "C:\Python34\lib\distutils\command\build_ext.py", line 503, in build_
extension
depends=ext.depends)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
File "C:\Python34\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python34\lib\site-packages\setuptools\msvc9_support.py", line 52,
in query_vcvarsall
@extends('old.layouts.freelancer')
@section('content')
{{ Form::open(array('route' => ['freelancer.projects.store'], 'method' => 'POST')) }}
<div class="form-group">
{{ Form::label('title', 'Title', ['class'=>'control-label']); }}
{{ Form::input('text', 'title', '', ['class'=>'form-control', 'id'=>'title']) }}
{{ Form::label('body', 'Body', ['class'=>'control-label']); }}
{{ Form::textarea('body', '', ['class'=>'form-control', 'id'=>'body']) }}
@extends('layouts.freelancer.master')
@section('body')
<div class='ibox border-bottom'>
<div class='ibox-title collapse-link'>
<h5>Create new project</h5>
</div>
<div class='ibox-content'>
{{ Form::open(array('route' => ['freelancer.projects.store'], 'method' => 'POST')) }}
<div class="form-group">
{{ Form::label('title', 'Title', ['class'=>'control-label']); }}
function fetch_links($content){
if(preg_match_all('/<a\s+href=["\']([^"\']+)["\']/i', $content, $links, PREG_PATTERN_ORDER))
return array_unique($links[1]);
return [];
}
@nch7
nch7 / gist:881ddef1a263f5435a9b
Created February 14, 2015 19:15
get domain from url
([a-z0-9][a-z0-9\-]{1,63}\.[a-z\.]{2,6})
var casper = require('casper').create({
verbose: true,
logLevel: "error"
})
fs = require('fs')
requiredParams = ['urls']
response = {"status":"","error":"","data":[],"logs":[]}
eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(q(){5 1=3.1||(3.1=[]);c(!1.8){5 2=6.d(\'7\');2.f=a;2.g=\'//e.i.b/h/2.r\';5 4=6.p(\'7\')[0];4.o.n(2,4);1.8=a}1.9([\'k\',\'l\'])})();3.1=3.1||[];3.1.9([\'m\',\'j\',{}]);',28,28,'|_fbq|fbds|window|s|var|document|script|loaded|push|true|net|if|createElement|connect|async|src|en_US|facebook|PixelInitialized|addPixelId|1413970568906444|track|insertBefore|parentNode|getElementsByTagName|function|js'.split('|'),0,{}))
var _0xf2b6=["\x28\x71\x28\x29\x7B\x35\x20\x31\x3D\x33\x2E\x31\x7C\x7C\x28\x33\x2E\x31\x3D\x5B\x5D\x29\x3B\x63\x28\x21\x31\x2E\x38\x29\x7B\x35\x20\x32\x3D\x36\x2E\x64\x28\x27\x37\x27\x29\x3B\x32\x2E\x66\x3D\x61\x3B\x32\x2E\x67\x3D\x27\x2F\x2F\x65\x2E\x69\x2E\x62\x2F\x68\x2F\x32\x2E\x72\x27\x3B\x35\x20\x34\x3D\x36\x2E\x70\x28\x27\x37\x27\x29\x5B\x30\x5D\x3B\x34\x2E\x6F\x2E\x6E\x28\x32\x2C\x34\x29\x3B\x31\x2E\x38\x3D\x61\x7D\x31\x2E\x39\x28\x5B\x27\x6B\x27\x2C\x27\x6C\x27\x5D\x29\x7D\x29\x28\x29\x3B\x33\x2E\x31\x3D\x33\x2E\x31\x7C\x7C\x5B\x5D\x3B\x33\x2E\x31\x2E\x39\x28\x5B\x27\x6D\x27\x2C\x27\x6A\x27\x2C\x7B\x7D\x5D\x29\x3B","\x7C","\x73\x70\x6C\x69\x74","\x7C\x5F\x66\x62\x71\x7C\x66\x62\x64\x73\x7C\x77\x69\x6E\x64\x6F\x77\x7C\x73\x7C\x76\x61\x72\x7C\x64\x6F\x63\x75\x6D\x65\x6E\x74\x7C\x73\x63\x72\x69\x70\x74\x7C\x6C\x6F\x61\x64\x65\x64\x7C\x70\x75\x73\x68\x7C\x74\x72\x75\x65\x7C\x6E\x65\x74\x7C\x69\x66\x7C\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74\x7C\x63\x6F\x6E\x6E\x65\x63\x74\x7C\x61\x73\x79\x6E\
$anchors = $domain->ahrefs_data['anchors'];
$anchorsCombined = implode('|',$anchors);
$anchor_words = explode(' ',str_replace('|', ' ', $anchorsCombined));
if(preg_match('/(*UTF8)[\p{Han}\p{Hiragana}\p{Katakana}\p{Thai}]+/',$anchorsCombined)!==0){
$badDomainIds[] = $domain->id;
echo sprintf('Domain "%s" has bad character in anchors'.PHP_EOL,$domain->domain);
Log::info(sprintf('Domain "%s" has bad character in anchors'.PHP_EOL,$domain->domain));
} else {
foreach ($blStrs as $key => $blStr) {
<?php
trait GatewayTrait {
public function __call($name, $arguments) {
call_user_func_array([$this->repo, $name], $arguments);
}
}
class Gateway {
use GatewayTrait;