Skip to content

Instantly share code, notes, and snippets.

View clytras's full-sized avatar

Christos Lytras clytras

View GitHub Profile
/* *
* @package Joomla.Platform
* @subpackage Document
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
$.ajax({
type: "GET",
url: 'steel_agg_bof_flash_en.xml',
dataType: "xml",
success: xmlParser
});
function xmlParser(xml) {
$(xml).find("hotspot").each(function() {
function addCircle(options) {
$('#clickAreas').append(
$('<div/>', {
id: options.hotspotid,
title: options.title,
'class': 'circle',
css: {
top: options.top+'px',
left: options.left+'px',
width: options.width+'px',
<?php
// PHP Proxy example for Yahoo! Web services.
// Responds to both HTTP GET and POST requests
//
// Author: Jason Levitt
// December 7th, 2005
//
// Allowed hostname (api.local and api.travel are also possible here)
define ('HOSTNAME', 'http://search.yahooapis.com/');
@clytras
clytras / nginx.conf
Created December 18, 2016 01:37 — forked from jrom/nginx.conf
nginx hack for multiple conditions
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";
@clytras
clytras / gist:8afdbd1f4fd7088da5af9e66ff0e3d75
Created March 14, 2017 08:28 — forked from kbingman/gist:6557074
external include for casper.js login and preview
var require = patchRequire(require);
var loginAndPreview = function(baseUrl, bundleLocation, test){
casper.start('http://preview.mobify.com/', function suite() {
// Add a title comment so that you know what's happening and when
casper.test.comment('Lululemon - 2013 Refresh');
// Log out what we are doing
@clytras
clytras / quotes_json.js
Created March 15, 2017 08:49 — forked from mickaelandrieu/quotes_json.js
Scrap a website with CasperJs, JSON output.
var links = [];
var quotes = [];
var tempUrl = [];
var infos = [];
var maxLinks = 10;
var firstUrl = 'http://www.imdb.com/search/title?at=0&num_votes=5000,&sort=user_rating,desc&start=1&title_type=tv_infoss';
var newUrl;
var x = require('casper').selectXPath;
@clytras
clytras / watchfiles.md
Created December 1, 2017 21:20 — forked from thiagoh/ watchfiles.md
watchfiles: Watch multiple files and execute bash commands as file changes occur

watchfiles

  • author: Thiago Andrade thiagoh@gmail.com
  • license: GPLv3
  • description:
  • watches the given paths for changes
  • and executes a given command when changes occur
  • usage:
  • watchfiles <paths...>
Microsoft Windows [Version 10.0.10586]
]9;8;"USERNAME"\@]9;8;"COMPUTERNAME"\ C:\Users\zkr32
$ ]9;12\dir
Volume in drive C is Windows
Volume Serial Number is A2EF-3521
Directory of C:\Users\zkr32
04/12/2017 04:17 μμ <DIR> .
Microsoft Windows [Version 10.0.10586] 
 
zkr32@ZKRWS C:\Users\zkr32 
> cd E:\Programming\Android\ReactNative\ZKRTestSharedProject 
 
zkr32@ZKRWS C:\Users\zkr32 
> e: