This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
+----------------------------------------------------------------------+ | |
| APC | | |
+----------------------------------------------------------------------+ | |
| Copyright (c) 2006-2011 The PHP Group | | |
+----------------------------------------------------------------------+ | |
| This source file is subject to version 3.01 of the PHP license, | | |
| that is bundled with this package in the file LICENSE, and is | | |
| available through the world-wide-web at the following url: | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{capture name="preview"}{$smarty.const.PATH_TO_FILE}unknown.pdf{/capture} | |
{if $smarty.capture.preview|is_file} | |
<embed width="100%" height="100%" name="plugin" src="....." type="application/pdf"> | |
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$start = microtime(true); | |
error_log( $start ); | |
// if( !apc_exists( 'xml' )) | |
// { | |
$xml = simplexml_load_file('cpv_2008.xml'); | |
// apc_add( 'xml', $xml ); | |
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .bashrc | |
[ -z "$PS1" ] && return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class EnvStream | |
{ | |
private $var, $position = 0; | |
function stream_open($path, $mode, $options, &$opened_path) | |
{ | |
$this->var = parse_url( $path, PHP_URL_HOST ); | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
fromVersion=$1 | |
if [ -d .sql-update ] | |
then | |
start=false | |
for sqlFile in `ls -v .sql-update/*` | |
do | |
if [[ $sqlFile == *$fromVersion* ]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// load ZabbixApi (http://zabbixapi.confirm.ch/) | |
require 'ZabbixApiAbstract.class.php'; | |
require 'ZabbixApi.class.php'; | |
try { | |
// connect to Zabbix API | |
$api = new ZabbixApi("..."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqldump --routines --no-create-info --no-data --no-create-db --skip-opt <database> > outputfile.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change | |
require_once '../../../wp-load.php'; | |
# into | |
require_once '../../../different-dir/wp-load.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Not working | |
wp_enqueue_style( 'tell-a-friend', get_option('siteurl').'/wp-content/plugins/wp-tell-a-friend-popup-form/tell-a-friend.css'); | |
wp_enqueue_script( 'tell-a-friend-form', get_option('siteurl').'/wp-content/plugins/wp-tell-a-friend-popup-form/tell-a-friend-form.js'); | |
wp_enqueue_script( 'tell-a-friend-popup', get_option('siteurl').'/wp-content/plugins/wp-tell-a-friend-popup-form/tell-a-friend-popup.js'); | |
# Working | |
wp_enqueue_style( 'tell-a-friend', plugins_url( 'tell-a-friend.css', __FILE__ ) ); | |
wp_enqueue_script( 'tell-a-friend-form', plugins_url( 'tell-a-friend-form.js', __FILE__ ) ); | |
wp_enqueue_script( 'tell-a-friend-popup', plugins_url( 'tell-a-friend-popup.js', __FILE__ ) ); |