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
<section class="content-block gallery-1 gallery-1-1"> | |
<?php | |
$gallery = blocks_get_gallery( get_theme_mod( 'blocks_gallery_1_1_source' ) ); | |
?> | |
<div class="container"> | |
<div class="underlined-title"> | |
<h1><?php echo get_theme_mod( 'blocks_gallery_1_1_title', __( 'A selection of our work', 'blockswpdemo' ) ); ?></h1> | |
<hr> | |
<h2><?php echo get_theme_mod( 'blocks_gallery_1_1_subtitle', __( 'Hand-picked just for you', 'blockswpdemo' ) ); ?></h2> | |
</div> |
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
// Фрагменты кода Pinegrow + полезные фрагменты из других источников | |
/* functions.php - Pinegrow generated Enqueue Scripts and Styles */ | |
if ( ! function_exists( 'prokopskiy_2_enqueue_scripts' ) ) : | |
function prokopskiy_2_enqueue_scripts() { | |
/* Pinegrow generated Enqueue Scripts Begin */ | |
wp_deregister_script( 'jquery' ); |
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 Db | |
{ | |
private $_connection; | |
private static $_instance; //The single instance | |
private $_host = DB_HOST; | |
private $_username = DB_USER; | |
private $_password = DB_PASSWORD; | |
private $_database = DB_DB; |
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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title></title> | |
<meta http-equiv="refresh" content="2"> | |
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> | |
<style type="text/css"> | |
.chat-body { | |
margin-bottom: 10px; |
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
CREATE TABLE `s_chat_messages` ( | |
`id` INT(11) NOT NULL AUTO_INCREMENT , | |
`user` VARCHAR(255) NOT NULL , | |
`message` VARCHAR(255) NOT NULL , | |
`when` INT(11) NOT NULL , | |
PRIMARY KEY (`id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
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 | |
/* | |
* Mysql database class - only one connection alowed | |
*/ | |
class Database { | |
private $_connection; | |
private static $_instance; //The single instance | |
private $_host = "HOSTt"; | |
private $_username = "USERNAME"; | |
private $_password = "PASSWORd"; |
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 | |
function rpn($params) { | |
$params = explode(' ', $params); | |
$count = sizeof($params); | |
$result = null; |
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 | |
$fileName = $_FILES['afile']['name']; | |
$fileType = $_FILES['afile']['type']; | |
$fileContent = file_get_contents($_FILES['afile']['tmp_name']); | |
$dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent); | |
$json = json_encode(array( | |
'name' => $fileName, | |
'type' => $fileType, | |
'dataUrl' => $dataUrl, |
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
#!/usr/bin/env python | |
# an rpn calculator in python | |
# > 19 2.14 + 4.5 2 4.3 / - * | |
# [85.297441860465113] | |
# only supports two operands and then an operator | |
import operator | |
ops = { '+': operator.add, |
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 | |
// Include the phpQuery library | |
// Download at http://code.google.com/p/phpquery/ | |
include 'phpQuery.php'; | |
// Load Mike Fisher's player page on thescore.com | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'http://www.thescore.com/nhl/player_profiles/859-mike-fisher'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
NewerOlder