Skip to content

Instantly share code, notes, and snippets.

View ASDAFF's full-sized avatar
🏠
Working from home

ASDAFF ASDAFF

🏠
Working from home
View GitHub Profile
_log_pskb(date_created,link_id,logname,log)
account(id,uid,sum)
account_attach(account_id,file_id,name,orig_name)
account_transaction(user_id,yd)
activate_service(code,email,data)
admin_log_users(user_id,log_id,last_comment_view)
annoy(ip,last_req)
articles(title,short,msgtext,sign,logo,link)
articles_comments(from_id,parent_id,from_ip,created_time,article_id,msgtext,youtube_link)
articles_comments_files(comment_id,file_id,small,inline,temp)
@ASDAFF
ASDAFF / 0_reuse_code.js
Created November 12, 2015 23:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ASDAFF
ASDAFF / gist:bd37d1cdbf09faa85e30
Last active November 18, 2015 21:38 — forked from pragmatic-web/gist:6306792
Получение миниатюры с конкретным размером Vimeo с помощью cURL/PHP (http://www.soapboxdave.com/2010/04/getting-the-vimeo-thumbnail/)
function vimeo_thumb_size( $id, $size = 'large' ) {
// Sanitize the variables
$id = esc_attr( $id );
$size = esc_attr( $size );
// Stop if no video ID entered
if ( empty( $id ) )
return 'Error - no video ID specified';
<?php
/**************************************/
/** HtmlFromNabor snippet for MODX Revo
*
* @version 0.2
* @author Borisov Evgeniy aka Agel Nash (agel-nash@xaker.ru)
* @date 18.12.2012
*
* @category snippet
* @internal @modx_category System
@ASDAFF
ASDAFF / how to use
Last active January 5, 2016 17:12 — forked from coonica/how to use
MODX Revo snippet to divide resources into columns.
Call the snippet
[[multiCols?
&cols=`2`
&tvs=`{"image":1}`
&select=`pagetitle,introtext`
&where=`{"published":1, "deleted":0, "parent":2}`
&sortby=`publishedon`
&sortdir=`DESC`
&tpl=`tpl_article`
$('.order').click(function(){
var ide = $(this).parent().find('input:hidden').val();
$.ajax({
type: "POST",
data: 'action=ADD2BASKET&ajax_basket=Y&id='+ide,
url: '/',
success: function(data){
data = data.split('\'').join('\u0022');
var obj = JSON && JSON.parse(data) || $.parseJSON(data);
if (obj.STATUS == 'OK'){
@ASDAFF
ASDAFF / gist:6406cb9f52a7538b2666ed24376dcbcc
Created November 30, 2017 21:32 — forked from anonymous/gist:e54c8a2951d6e8c03f25db60646061de
Преобразование upd в модуль
<?php
//Полный путь к папке, в которой лежат "UPD" Последний слеш не нужен!
$dir = '/home/bitrix.dev/www/bitrix/your.upd.folder';
if ($handle = opendir($dir)) {
while (false !== ($entry = readdir($handle))) {
if($entry == "." || $entry == ".."){continue;}
$string = file_get_contents($dir."/".$entry);
@ASDAFF
ASDAFF / SublimeTextKey
Created March 12, 2018 13:04 — forked from Robbyzhaxx/SublimeTextKey
Sublime Text Licence Key
—– BEGIN LICENSE —–
TwitterInc
200 User License
EA7E-890007
1D77F72E 390CDD93 4DCBA022 FAF60790
61AA12C0 A37081C5 D0316412 4584D136
94D7F7D4 95BC8C1C 527DA828 560BB037
D1EDDD8C AE7B379F 50C9D69D B35179EF
2FE898C4 8E4277A8 555CE714 E1FB0E43
D5D52613 C3D12E98 BC49967F 7652EED2
@ASDAFF
ASDAFF / LICENCE SUBLIME TEXT
Created March 12, 2018 13:06 — forked from cprakashagr/LICENCE SUBLIME TEXT
Sublime Text 3 Serial key build is 3143
## Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
@ASDAFF
ASDAFF / fx_getSectionList.php
Created May 27, 2018 18:45 — forked from di7spider/fx_getSectionList.php
1С-bitrix :: Возвращает разделы и вложенные подразделы в иерархическом виде
<?php
/** Возвращает разделы и вложенные подразделы в иерархическом виде */
function getSectionList($filter, $select)
{
$dbSection = CIBlockSection::GetList(
Array(
'DEPTH_LEVEL' => 'ASC',
'SORT' => 'ASC'
),