Skip to content

Instantly share code, notes, and snippets.

View anaynayak's full-sized avatar

Anay Nayak anaynayak

View GitHub Profile
@longhotsummer
longhotsummer / centroid.js
Last active July 7, 2016 06:56
Using D3, topojson and node.js to calculate the centroid of topojson features
/* A node.js script that uses D3 and topojson to calculate and output the lat/long
* coordinates of the centroid for a collection of topojson boundary features.
*/
// install using npm install d3
var d3 = require("d3");
// download from http://d3js.org/topojson.v1.min.js
var topojson = require("./topojson.v1.min.js");
// load json
@philandstuff
philandstuff / scale-summit.org
Last active August 29, 2015 13:57
scale-summit 2014

Scale Summit 2014

Intro, MBS

ideas for sessions

  • bootstrapping environments (without object stores)
  • service discovery
  • removing spofs
@MagnusSmith
MagnusSmith / Application.java
Last active March 25, 2022 00:38
Java configuration for Spring with Axon Framework 2.09
package config;
import orders.commandhandling.Order;
import orders.commandhandling.OrderCommandHandler;
import org.axonframework.commandhandling.CommandBus;
import org.axonframework.commandhandling.SimpleCommandBus;
import org.axonframework.commandhandling.annotation.AnnotationCommandHandlerBeanPostProcessor;
import org.axonframework.commandhandling.gateway.CommandGatewayFactoryBean;
import org.axonframework.eventhandling.EventBus;
import org.axonframework.eventhandling.SimpleEventBus;
@goldsmith
goldsmith / python_mavericks_guide.sh
Last active December 25, 2024 20:56
When I upgraded my Mac to OS X Mavericks, a lot of utilities (like Python, virtualenv, Xcode) broke, and it was pretty stressful trying to get it all set back up. Hopefully this guide can spare you some of that pain.Note: I'm by no means a Linux or Mac expert, so please fork and let me know if anything is redundant, incorrect, or missing!
# A guide to prevent pain and suffering while upgrading to OS X Mavericks
# This will vary greatly depending on system set up, so read the instructions carefully
# Back up Virtulenvs
####################
# Very important!
# For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv
# in order to prevent loss of dependencies during the upgrade.
@wsargent
wsargent / docker_cheat.md
Last active September 23, 2025 16:14
Docker cheat sheet
@ranjib
ranjib / omnibus_creator.rb
Last active December 22, 2015 20:59
Create your omnibus installers using lxc & Chef
require 'lxc'
require 'lxc/extension'
# In this gist, we'll spawn an lxc container, use the lxc-chef/ssh extensions to install chef & omnibus
# then we'll drop our omnibus dummy definition , then build the omnibus installer
# then finally we'll copy over the resulting debian on the host box, and destroy the whole container
# you can create a rpm by spawning a centos/fedora container
LXC.use_sudo = true
vm = LXC::Container.new('omnibus-creator')

Spree (vs. Magento)

  • Spree does not offer media management as a CMS function

This is true, but we do have some extensions such as spree_static_content that do provide the ability to create extra pages for your site.

  • One page checkout is available on Magento, but not Spree

Assuming you mean the fields are all on one page: This is not provided by default, but it is relatively easy to customize Spree to do this. It's pretty commonly requested, and so it might be a good idea for us to provide a guide on how to do this.

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@ebidel
ebidel / Web Components Resources.md
Last active November 16, 2025 03:12
List of resources related to Web Components
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active October 22, 2025 20:58
Backend Architectures Keywords and References