Skip to content

Instantly share code, notes, and snippets.

Avatar

Anton Babushkin ababushkin

View GitHub Profile
@ababushkin
ababushkin / create-asset-squiz-matrix.php
Created Sep 21, 2011
PHP - Create an asset in Squiz / MySource Matrix
View create-asset-squiz-matrix.php
<?php
// First, include the Matrix bootstrap
// When ever a user makes any request to a Matrix page, this file is loaded (i.e. in the index.php file)
$SYSTEM_ROOT = "/home/websites/squiz_matrix/";
require_once $SYSTEM_ROOT . "core/include/init.inc";
// Now we need to log in
// The easiest user to work with is Root User
$root_user = $GLOBALS["SQ_SYSTEM"]->am->getSystemAsset("root_user");
@ababushkin
ababushkin / js-snippets-squiz-matrix.js
Created Sep 21, 2011
JavaScript Snippets for Squiz / MySource Matrix
View js-snippets-squiz-matrix.js
/**
/**
* Changes the sort order of assets in Squiz Matrix
* Author: Nicholas Hubbard (http://www.zedsaid.com/blog/change-the-asset-map-sort-order-using-javascript-in-squiz-matrix)
*
* @param number id ID of the asset to move
* @param number parent ID of the parent that the asset is under
* @param number new_position New position of asset (0 is first in the sort order)
*
* @return string
@ababushkin
ababushkin / gist:1221305
Created Sep 16, 2011 — forked from benjaminpearson/gist:1102194
Apps for a fresh Mac OS
View gist:1221305
1password - Password mangager
Adium - Instant messenger
Arq - Amazon s3 backup
Base - Sqlite db viewer
Caffeine - Keeps computer awake
Charles - Web debugging proxy
Cornerstone - SVN client
Cyberduck - FTP client
Delibar - Delicious bookmarking menu item
DiskWave - Monitor hdd space