Skip to content

Instantly share code, notes, and snippets.

View mirzu's full-sized avatar

Michal Minecki mirzu

View GitHub Profile
@mirzu
mirzu / default
Created August 29, 2012 17:41
local apache config file
<VirtualHost *:80>
ServerAdmin webmaster@localhost
UseCanonicalName Off
VirtualDocumentRoot /var/www/local/%-2
<Directory /var/www/local/*>
RewriteEngine On
RewriteBase /
Options Indexes FollowSymLinks MultiViews
AllowOverride All
@mirzu
mirzu / gist:3982145
Last active October 12, 2015 06:07
Node.js Training Layout
<!doctype html>
<head>
<title>{{title}}</title>
<link rel='stylesheet' href='/css/style.css'>
</head>
<body>
@mirzu
mirzu / nodes.html
Last active October 12, 2015 06:07
Node.js Training Nodes Template
<h1>nodes</h1>
{{#if results}}
<ul>
{{#each results}}
<li> {{this.title}}</li>
{{/each}}
</ul>
{{else}}
<p> No results</p>
{{/if}}
diff --git a/index.html b/index.html
index edc38c9..6e37719 100644
--- a/index.html
+++ b/index.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html>
+<html manifest="offline.manifest.php">
<head>
<title>Harvard proposal</title>
@mirzu
mirzu / app.js
Last active December 18, 2015 18:49
images emmiter
setInterval(function newImages() {
// TODO (bonus) - fetch images from flickr or other feeds and refresh the
// client with the fetched content.
images('http://api.flickr.com/services/feeds/photos_public.gne?format=json&tags=badcamp&nojsoncallback=1', function(err, data) {
var newImagesAry = [];
data = JSON.parse(data);
data.items.forEach(function eachItem(item) {
newImagesAry.push({
picture: item.media.m,
@mirzu
mirzu / images.js
Created June 21, 2013 00:54
images stream function
var request = require('superagent');
var Stream = require('stream');
/**
* Get Images function
*
*/
module.exports = function images(url, fn) {
var data = '';
// Set up a stream to pipe data to.
{
"data": [{
"type": "text",
"data": {
"text": "Hello, my name is **Sir Trevor**"
}
}]
"data": [{
"type": "video reference",
"data": {
<?php
// ...
$context = array(
'type' => $type,
'profile' => $profile);
$clone_entity = clone $entity;
drupal_alter('pmpapi_push_doc', $doc, $context, $cloned_entity);
return $doc;
//....
@mirzu
mirzu / config.yml
Created June 17, 2015 23:32
Config to use xdebug locally
---
# Vagrant configuration.
# `vagrant_box` can also be set to geerlingguy/centos6, geerlingguy/centos7,
# geerlingguy/ubuntu1204, parallels/ubuntu-14.04, etc.
vagrant_box: geerlingguy/ubuntu1404
vagrant_hostname: drupalvm.dev
vagrant_ip: 192.168.88.88
vagrant_user: vagrant
# A list of synced folders, with the keys 'local_path', 'destination', 'id', and
@mirzu
mirzu / xdebug.ini
Created June 18, 2015 00:36
Xdebug Setting.
[XDebug]
zend_extension="/usr/lib/php5/modules/xdebug.so"
xdebug.coverage_enable=1
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_host=localhost
xdebug.remote_port=9000