This file contains hidden or 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 basename_real($file) | |
{ | |
$f = parse_url($file); | |
return basename($f['path']); | |
} | |
$exts = array("gif","jpg","png","jpeg"); | |
$url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ-ZVGZex9dyrwByXjAQ2cgE0VwH9CCitYhtSUC0pndN7iQwK1r'; | |
$suff = @explode('.',basename_real($url)); |
This file contains hidden or 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
if(preg_match_all('/<a href="([^"]+)"><img class="c_img" src="([^"]+\.gif)"><\/a>/Us', $comment['comment_desc'], $matches) | |
|| preg_match_all('/<a href="([^"]+)"><img class="b-image" src="([^"]+\.gif)"><\/a>/Us', $comment['comment_desc'], $matches)) { |
This file contains hidden or 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
{ | |
"dependencies": { | |
"jquery": { | |
"version": "~1.11.0", | |
"homepage": "http://jquery.com/", | |
"development": {"js": "dist/jquery.js"}, | |
"production": {"js": "dist/jquery.min.js"}, | |
"sdn": "//yandex.st/jquery/1.11.0/jquery.min.js", | |
"pack": false, | |
"shortcuts": "jQuery" |
This file contains hidden or 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/sh | |
# | |
### BEGIN INIT INFO | |
# Provides: webrtc2sip | |
# Required-Start: $syslog $network $local_fs $remote_fs $time | |
# Required-Stop: $syslog $network $local_fs $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start and stop the webrtc2sip SIP and Media Gateway | |
# Description: Start and stop the webrtc2sip SIP and Media Gateway |
This file contains hidden or 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
USE [master] | |
GO | |
/****** Object: StoredProcedure [dbo].[sp_dboption] Script Date: 21.03.2012 7:33:37 ******/ | |
SET ANSI_NULLS ON | |
GO |
This file contains hidden or 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
$.post('articles', {title: 'title', text: 'text'}, 'json').done(function(response){ | |
var article = response.data; | |
self.articles.push(article); | |
}).fail(function(e, ){ | |
switch(e.status){ | |
case 422: | |
var messages = response.responseText; | |
// Обработать ошибку валидации и вывести сообщения | |
default: | |
// Обработать ошибку сервера или соединения |
This file contains hidden or 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
/** | |
* | |
* @param {String} moduleName module name or path to file | |
*/ | |
function require(moduleName) {} | |
/** | |
* Matches in-package modules | |
* | |
* @param {RegExp} regExp |
This file contains hidden or 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
/** | |
* Loads a module. | |
* See {@link http://nodejs.org/api/modules.html} for more information. | |
* @param {String} moduleName | |
* @returns {*} | |
*/ | |
function require(moduleName) {} | |
/** | |
* Use the internal <i><code>require()</code></i> machinery to look up the location of a module, |
This file contains hidden or 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
Template = { | |
settings: { | |
//evaluate: /\{\{([\s\S]+?)\}\}/g, | |
//interpolate: /\{\{=([\s\S]+?)\}\}/g, | |
// SYNC UnderScore | |
evaluate: /<%([\s\S]+?)%>/g, | |
interpolate: /<%=([\s\S]+?)%>/g, | |
// | |
encode: /\{\{!([\s\S]+?)\}\}/g, | |
use: /\{\{#([\s\S]+?)\}\}/g, |
This file contains hidden or 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
// Underscore.js 1.2.1 | |
// (c) 2011 Jeremy Ashkenas, DocumentCloud Inc. | |
// Underscore is freely distributable under the MIT license. | |
// Portions of Underscore are inspired or borrowed from Prototype, | |
// Oliver Steele's Functional, and John Resig's Micro-Templating. | |
// For all details and documentation: | |
// http://documentcloud.github.com/underscore | |
(function() { |
NewerOlder