Skip to content

Instantly share code, notes, and snippets.

@dsueiro
dsueiro / cmsblockfix.diff
Created December 15, 2016 00:22 — forked from piotrekkaminski/cmsblockfix.diff
cms block fix
diff --git a/app/code/core/Mage/Cms/Block/Block.php b/app/code/core/Mage/Cms/Block/Block.php
index bc81de3..a0dce44 100755
--- a/app/code/core/Mage/Cms/Block/Block.php
+++ b/app/code/core/Mage/Cms/Block/Block.php
@@ -72,4 +72,24 @@ protected function _toHtml()
}
return $html;
}
+
+ /**
@dsueiro
dsueiro / warmly.sh
Created October 5, 2016 20:03 — forked from thomasfr/warmly.sh
A wget based easy poor man`s cache warmer script
#!/bin/bash
# warmly.sh
# A wget based, easy, poor man`s cache warmer script
# https://gist.github.com/thomasfr/7926314
# The MIT License (MIT)
#
# Copyright (c) 2013,2014 Thomas Fritz <fritztho@gmail.com> (http://fritzthomas.com)
#
@dsueiro
dsueiro / shell.c
Created September 12, 2016 20:02 — forked from parse/shell.c
Simple shell in C
/* Compile with: g++ -Wall –Werror -o shell shell.c */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
@dsueiro
dsueiro / 0001-BUGIFX-Magento-Zend-Framework-1-PHP5.6.patch
Created July 26, 2016 20:52 — forked from renttek/0001-BUGIFX-Magento-Zend-Framework-1-PHP5.6.patch
Bugfix for Zend Framework 1 in Magento (>= 1.7.*.*) + PHP 5.6
From 473846959772d8160b34b92ae3bcecddf24b972f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julian=20Nu=C3=9F?= <julian.nuss@outlook.com>
Date: Tue, 23 Sep 2014 21:07:29 +0200
Subject: [PATCH 1/1] [BUGIFX] Zend Framework 1 + PHP5.6
---
lib/Zend/Locale/Format.php | 22 +++++++++++-----------
lib/Zend/Service/Audioscrobbler.php | 6 +++---
lib/Zend/Service/Technorati.php | 6 +++---
lib/Zend/Validate/Hostname.php | 4 ++--
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define N 5
void pexit(char *error) {
perror(error);
@dsueiro
dsueiro / .vimrc
Last active August 29, 2015 14:16 — forked from JeffreyWay/.vimrc
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@dsueiro
dsueiro / fibonacci.js
Last active August 29, 2015 14:14 — forked from Artanis/fibonacci.js
// Take a function and return a function that caches the results of
// that function.
//
// Setting debug to true will print the logic the caching function uses.
var memoize = function(fn, debug) {
// Caching object, in the form {args : value}
var cache = {};
// Caching function. No explicit args. Any args are fed into the
// memoized function via apply().
<?php
/**
* Set global/skip_process_modules_updates to '1' in app/etc/local.xml and
* then use this script to apply updates and refresh the config cache without
* causing a stampede on the config cache.
*
* @author Colin Mollenhour
*/
umask(0);
ini_set('memory_limit','512M');
#!/usr/bin/php
<?php
if(file_exists('app/Mage.php')) require 'app/Mage.php';
else require '../../app/Mage.php';
Mage::app();
Mage::getModel('core/cache')->flush();