Skip to content

Instantly share code, notes, and snippets.

View kbariotis's full-sized avatar
🌏

Kostas Bariotis kbariotis

🌏
View GitHub Profile
@plentz
plentz / nginx.conf
Last active December 14, 2025 13:43
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@konklone
konklone / Dockerfile
Created September 22, 2013 18:17
Dockerfile for installing Ruby 2.0 and RVM
FROM ubuntu
MAINTAINER Eric Mill "[email protected]"
# turn on universe packages
RUN echo "deb http://archive.ubuntu.com/ubuntu raring main universe" > /etc/apt/sources.list
RUN apt-get update
# basics
RUN apt-get install -y nginx openssh-server git-core openssh-client curl
RUN apt-get install -y nano
@CharlesAMoss
CharlesAMoss / index.html
Created August 10, 2013 02:35
A CodePen by charlie. clock widget - Clock Widget ------------ HTML CSS SASS(SCSS) JavaScript SVG *inspiration* dribbble rebound of MVben's design http://dribbble.com/shots/1145537-Plug-In1 *nuts and bolts* http://blog.stevenlevithan.com/archives/date-time-format http://stackoverflow.com/questions/1531093/how-to-get-current-date-in-javascript ht…
<!--
dribbble rebound of MVben's design http://dribbble.com/shots/1145537-Plug-In1
-->
<div class="main">
<div class="nav">
<ul>
<li class="al">Alarms</li>
<li class="sw">Stopwatch</li>
@parhamr
parhamr / 0: Magento 1.12 Enterprise multi-store cluster configuration.md
Last active October 13, 2023 14:20
A highly available, fault tolerant, distributed, and load balanced LEMP cluster.
<h1>Flexible columns &mdash; fixed width gutter</h1>
<h2>Using a border as faux margin</h2>
<div class="flexwrapper">
<section></section>
<section></section>
<section></section>
<section></section>
</div>
var myModel = new Backbone.Model(attributes, {options}, anything-else-passed-to-initialize-function);
/*
attributes = {data:value, data:value} or [value,value]
options = {
collection: {},
url: '',
urlRoot: '',
parse: boolean
}
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active November 16, 2025 11:36
A badass list of frontend development resources I collected over time.
@baki250
baki250 / gist:5590680
Last active December 13, 2019 04:12 — forked from hightemp/gist:2387916

Magento Snippets

Download extension manually using pear/mage

Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/

./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent

Clear cache/reindex

@kalenjordan
kalenjordan / Batched Iterator for Magento collections
Last active May 9, 2022 12:25
Batched iterator for Magento collections
// This is how you would use it. Pass in your collection
// along with an individual callback as well as a batch callback
Mage::getSingleton('stcore/resource_iterator_batched')->walk(
$collection,
array($this, 'batchIndividual'),
array($this, 'batchAfter'),
self::BATCH_SIZE
);
public function batchIndividual($model)
@jasdeepkhalsa
jasdeepkhalsa / fif.js
Created March 12, 2013 09:59
Friendly iFrames (FIF) - Loading JavaScript Asynchronously Without Blocking window.onload by Stoyan Stefanov. Designed for loading third party scripts only (for first party scripts this script may have a negative performance impact, as tested by Yahoo)
// Documented by Stoyan Stefanov: https://www.facebook.com/note.php?note_id=10151176218703920
(function() {
var url = 'http://example.org/js.js';
var iframe = document.createElement('iframe');
(iframe.frameElement || iframe).style.cssText =
"width: 0; height: 0; border: 0";
iframe.src = "javascript:false";
var where = document.getElementsByTagName('script')[0];
where.parentNode.insertBefore(iframe, where);
var doc = iframe.contentWindow.document;