Skip to content

Instantly share code, notes, and snippets.

View MikSDigital's full-sized avatar
🎯
Focusing

Mikhail MikSDigital

🎯
Focusing
View GitHub Profile
@MikSDigital
MikSDigital / jsonp.js
Last active August 29, 2015 14:16 — forked from appastair/jsonp.js
jQuery(function($){
$.ajax({
type: 'GET',
url: '//remote.org/jsonp.php',
data: {
field: 'value'
},
dataType: 'jsonp'
crossDomain: true,
}).done(function(response){
@MikSDigital
MikSDigital / php-UA.php
Last active August 29, 2015 14:17 — forked from walkergv/php-UA.php
<?
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'http://www.google-analytics.com/collect?v=1&tid=[UA-XXXXXXXXX-1]&cid=[RANDOM_INTEGER_OR_GUID]&t=event&ec=[EVENT_CATEGORY]&ea=[EVENT_ACTION]&el=[EVENT_LABEL]',
CURLOPT_USERAGENT => 'Vanity-URL-Tracker',
));
$resp = curl_exec($curl);
curl_close($curl);
header("HTTP/1.1 301 Moved Permanently");
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Word Rotate</title>
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
@MikSDigital
MikSDigital / subdomain-context.php
Last active August 29, 2015 14:26 — forked from netProphET/subdomain-context.php
MODx Revolution plugin bound to OnHandleRequest event
<?php
/**
* plugin to map subdomain requests to contexts
* @setting event OnHandleRequest
* @todo currently, subdomains and context names are bound together.. remove this constraint through some mapping/lookup
* @todo currently, assumes first name in host (name before first dot) is what maps to the context
*/
$context = 'web';
@MikSDigital
MikSDigital / getTVLabel.snippet.php
Last active August 29, 2015 14:27 — forked from pepebe/getTVLabel.snippet.php
Proof of concept for toggling tv groups with a select TV in MODX.
<?php
/*
getTVLabel snippet for modx 2.3
Version:
------------------
v0.0.1 (2015-03-06 16:44)
Author:
------------------
# habraproxy.py — это простейший http-прокси-сервер, запускаемый локально (порт на ваше
# усмотрение), который показывает содержимое страниц Хабра. С одним исключением: после
# каждого слова из шести букв должен стоять значок «™». Примерно так:
#
# http://habrahabr.ru/company/yandex/blog/258673/
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Сейчас на фоне уязвимости Logjam все в индустрии в очередной раз обсуждают проблемы и
# особенности TLS. Я хочу воспользоваться этой возможностью, чтобы поговорить об одной из
# них, а именно — о настройке ciphersiutes.
#
@MikSDigital
MikSDigital / index.html
Last active August 31, 2015 15:00
Full Screen Video Background with minimal code. Coded with SASS and Coffee Script Requires jQuery!
<div class="bg-video">
<video loop autoplay>
<!-- Insert your video below -->
<source src="" type="video/mp4"></source>
</video>
</div>
@MikSDigital
MikSDigital / playstore_crawler.php
Created February 3, 2017 10:09 — forked from isogram/playstore_crawler.php
Playstore Crawler PHP using Symfony/DomCrawler and GuzzleHttp
<?php
use Cache; // alias from laravel
use Symfony\Component\DomCrawler\Crawler;
use GuzzleHttp\Client;
public function parsePlayStore($url='')
{
$parsedUrl = parse_url($url, PHP_URL_QUERY);
$packageNameFromUrl = 'com.inponsel.android';
@MikSDigital
MikSDigital / Vagrantfile.rb
Created February 3, 2017 15:03 — forked from jbalzar/Vagrantfile.rb
Set scotchbox default document root to /var/www
config.vm.provision "shell", inline: <<-SHELL
mv /var/www/public /var/www
sudo sed -i s,/var/www/public,/var/www,g /etc/apache2/sites-available/000-default.conf
sudo sed -i s,/var/www/public,/var/www,g /etc/apache2/sites-available/scotchbox.local.conf
sudo service apache2 restart
SHELL
@MikSDigital
MikSDigital / gitflow-breakdown.md
Created March 25, 2017 14:49 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository