Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block arush

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# Convert an animated video to gif
# Works best for videos with low color palettes like Dribbble shots
# @param $1 - video file name like ``
# @param @optional $2 - resize parameter as widthxheight like `400x300`
# Example: vidtogif 400x300
# Requirements: ffmpeg and gifsicle. Can be downloaded via homebrew
arush / floating div
Created Aug 2, 2011
Floating div based on scrollpoint
View floating div
loadPCROverlay: function () {
try {
var f ="CHECK_RATE");
var d = window.getScroll();
if (!h) {
if (!f || !d) {
arush / wordpress magento gigya reg
Created Aug 2, 2011
Wordpress Magento Gigya reg page
View wordpress magento gigya reg
<!-- head -->
<!-- BEGIN Gigya Socialize -->
<!-- socialize.js script should only be included once -->
<script type="text/javascript" src=""></script>
<script type="text/javascript">
var conf=
APIKey: "2_T-yAvt8V45JKSmDuCaS6tYQFMpkNeIpI-AeEa8T0zC2uuPRvTANZXks5Zu0UCHXo" ,enabledProviders: "facebook,twitter,yahoo,messenger,google,linkedin" ,connectWithoutLoginBehavior: 'alwaysLogin'
,onError:function(e) {
View code to place in any page or popup to set the cookie to suppress the popup or popup page
arush / price decimal modifyer
Created Aug 11, 2011
price decimal modifyer
View price decimal modifyer
// trim all decimals
public function formatPrice($price, $includeContainer = true)
if ($this->getCurrentCurrency()) {
return preg_replace('/.[0-9]*$/', '', $this->getCurrentCurrency()->format($price, array(), $includeContainer));
// return $this->getCurrentCurrency()->format($price, array(), $includeContainer);
return $price;
View magento curl
* fly2mars-media
* Twitter connector class
class twitterConnect
arush / FB like webhook
Created Aug 15, 2011
FB like webook / event subscribe
View FB like webhook
window.fbAsyncInit = function () {
appId: 'APPID',
Status: true,
Cookie: true,
Xfbml: true
FB.Event.subscribe('edge.create', function (response) {
Alert("Hello World! URL Liked!");
View oneall code
base > default > template > arush > oneall > scripts.phtml
if (Mage::helper('oneall')->isOneallEnabled()):
<script type="text/javascript">
var oneall_js_protocol = (("https:" == document.location.protocol) ? "https" : "http");
document.write(unescape("%3Cscript src='" + oneall_js_protocol + "://' type='text/javascript'%3E%3C/script%3E"));
arush / gist:1940064
Created Feb 29, 2012 — forked from leesbian/gist:1854374
Remove quotes that belong to anonymous users with expired cookies (because they'll never be able to retrieve them)
View gist:1940064
* Clean expired quotes (cron process)
* @param Mage_Cron_Model_Schedule $schedule
* @return Mage_Sales_Model_Observer
public function cleanExpiredQuotes($schedule)
Mage::dispatchEvent('clear_expired_quotes_before', array('sales_observer' => $this));
View ilb home mens
{{block type="evlike/cms_like" template="evlike/likebutton.phtml" name="cms.likebutton"}}
<div class="sidepromo">
<a href="" class="promo-item">
<a href="" class="promo-item bottom">
<div class="bigimage image_carousel">
<div id="foo">
<a href="/footwear.html" id="slide1"></a>
You can’t perform that action at this time.