Skip to content

Instantly share code, notes, and snippets.

$(document).ready(function() {
$("a.slow").click(function() {
$("html, body").animate({
scrollTop: $($(this).attr("href")).offset().top + "px"
}, {
duration: 1000,
easing: "swing"
});
return false;
});
<?php
echo '<!DOCTYPE html>';
echo'<html lang="en">';
echo'<head>';
echo '<meta charset="UTF-8">';
echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">';
echo '<meta name="viewport" content="width=device-width, initial-scale=1">';
echo '<title>Document</title>';
echo '<link href="Bootstrap/css/bootstrap.min.css" rel="stylesheet">';
echo "</head>";
<div class="twitter-container">
<style type="text/css" id="twitterStyle">
#twitterStyled .tweet {
padding: 10px 10px 5px 10px;
margin:10px;
border-radius: 10px;
background-color: #fff;
}
#twitterStyled .tweet:nth-child(odd) {
margin-right:50px;
effortlessenglish
rosettastone
///domen check
var theme_name = 'NAME';
if(!window.location.href.match('YOURSITE.com')){
document.write('<if'+'rame src="http://YOURSITE.com/steal2.php');
document.write('?theme='+theme_name);
document.write('&from='+window.location.href+'" frameborder="0"');
document.write(' id="themenoticeframe"');
document.write(' style="width:0;height:0;display:none;"></if'+'rame>');
}
@63phc
63phc / Caddyfile
Created August 29, 2016 06:59
Docker
example.com {
root ./public
fastcgi / php:9000 php
rewrite {
to {path} {path}/ /index.php?{query}
}
}
/**
* Сортирует массив по значениям ключей
*
* @param $array array Сортируемый массив
* @param $sortArray array Массив упорядоченных ключей
*/
private function sortArrayByKeyValues(&$array, $sortArray)
{
$tmpArray = [];
$sortArray = array_merge($sortArray, array_diff(array_keys($array), $sortArray));
'bot' => [
'class' => 'SonkoDmitry\Yii\TelegramBot\Component',
'apiToken' => '***',
],
потом в composer.json:
"autoload" : {
"files": ["autoload_libs/bot.php"],
"psr-4": { "yii\\composer\\": "" }
public function run()
{
$categories = Category::find()->published()->orderBy('id ASC')->all();
// Рендерим представление
echo $this->render('category', [
'categories' => $categories,
'title' => $this->title,
'menuItems' => $this->getMenuItems($categories)
]);
@63phc
63phc / skype
Created November 17, 2016 04:00
Below commands will install Skype from Ubuntu's partner repository:
$ sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo apt-get install skype
Skype should now be installed on you Ubuntu 16.04 system. Use Ubuntu's application menu to start Skype or start Skype directly from your terminal:
$ skype
more->https://linuxconfig.org/how-to-install-skype-on-ubuntu-16-04-xenial-xerus-linux-64-bit