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
function autoHeight() { | |
(function($, window, document, undefined) { | |
'use strict'; | |
var $list = $('.height-list'), | |
$items = $list.find('.height-item'), | |
setHeights = function() { | |
$items.css('height', 'auto'); | |
var perRow = Math.floor($list.width() / $items.width()); |
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
function remove_emoji($text){ | |
return preg_replace('/[\x{1F3F4}](?:\x{E0067}\x{E0062}\x{E0077}\x{E006C}\x{E0073}\x{E007F})|[\x{1F3F4}](?:\x{E0067}\x{E0062}\x{E0073}\x{E0063}\x{E0074}\x{E007F})|[\x{1F3F4}](?:\x{E0067}\x{E0062}\x{E0065}\x{E006E}\x{E0067}\x{E007F})|[\x{1F3F4}](?:\x{200D}\x{2620}\x{FE0F})|[\x{1F3F3}](?:\x{FE0F}\x{200D}\x{1F308})|[\x{0023}\x{002A}\x{0030}\x{0031}\x{0032}\x{0033}\x{0034}\x{0035}\x{0036}\x{0037}\x{0038}\x{0039}](?:\x{FE0F}\x{20E3})|[\x{1F441}](?:\x{FE0F}\x{200D}\x{1F5E8}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F467}\x{200D}\x{1F467})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F467}\x{200D}\x{1F466})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F467})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F466}\x{200D}\x{1F466})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F466})|[\x{1F468}](?:\x{200D}\x{1F468}\x{200D}\x{1F467}\x{200D}\x{1F467})|[\x{1F468}](?:\x{200D}\x{1F468}\x{200D}\x{1F466}\x{200D}\x{1F466})|[\x{1F468}](?:\x{200D}\x{1F468}\x{200D}\x{1F467}\x{200D}\x{1F466})|[\x{1F468}](?:\x{200D}\x{1F468}\x{200D}\x{1F467}) |
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 | |
$YouTubeKey = '{API KEY}'; | |
$YouTubeChannel = '{CHANNEL ID}'; | |
$YouTubeUrl = 'https://www.googleapis.com/youtube/v3/search?key='.$YouTubeKey.'&channelId='.$YouTubeChannel.'&part=snippet,id&order=date&maxResults=50'; | |
$YouTubeGetContent = file_get_contents($YouTubeUrl); | |
$YouTubeObject = json_decode($YouTubeGetContent); | |
$nextPageToken = $YouTubeObject->nextPageToken; | |
$total = $YouTubeObject->pageInfo->totalResults; |
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
ALTER IGNORE TABLE `TableName` ADD UNIQUE INDEX(`TableColumnName`); |
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
DELETE | |
a.* | |
FROM | |
TableName1 as a, | |
(SELECT | |
b.Title | |
FROM | |
TableName2 as b | |
) as c | |
WHERE |
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
Где SELECT @a:= 0 - с какого числа начать нумерацию | |
UPDATE | |
`TableName` | |
SET | |
`TableColumName` =(SELECT @a:= @a + 1 FROM (SELECT @a:= 0) s) | |
ORDER BY | |
`TableColumName` ASC |
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
each post, index in posts | |
if index % 3 === 0 | |
| <div class="row"> | |
div(class="span4") | |
h2 | |
a(href="/u/#{post.user}") #{post.user} 說 | |
p | |
small= post.time | |
p= post.post | |
if index % 3 === 2 || index === posts.length - 1 |