Skip to content

Instantly share code, notes, and snippets.

View cubewebsites's full-sized avatar

Ashraf Vali cubewebsites

View GitHub Profile
@cubewebsites
cubewebsites / download website assets
Created April 21, 2018 21:54 — forked from christiangenco/download website assets
Use wget to download a website's assets, including images, css, javascript, and html. From http://www.linuxjournal.com/content/downloading-entire-web-site-wget
$ wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--domains website.org \
--no-parent \
www.website.org/tutorials/html/
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@cubewebsites
cubewebsites / List.php
Created May 4, 2013 08:42
Sort by category position
<?php
/**
* Logic to fetch products for displaying the Featured Products widget
*
* @author Cube Websites
* @copyright Cube Websites 2012
* @version 2.0
* @package Cube_CategoryFeatured
* @link https://github.com/cubewebsites/Cube-Category-Featured-Products
*/
@cubewebsites
cubewebsites / gist:4327261
Created December 18, 2012 11:30
Installation for Laravel 4
git clone git://github.com/illuminate/app.git name-of-project
cd name-of-project
curl -s http://getcomposer.org/installer | php
php composer.phar install
chmod -R a=r+x *
chmod -R a=rwX app/storage
@cubewebsites
cubewebsites / 01. Gemfile
Created July 22, 2012 18:20 — forked from schleg/01. Gemfile
Setup for Devise + Omniauth (ActiveRecord)
gem 'pg'
group :development do
gem 'ruby-debug'
end
gem 'rake', '~> 0.8.7'
gem 'devise'
gem 'oa-oauth', :require => 'omniauth/oauth'
gem 'omniauth'
gem 'haml'
gem 'dynamic_form'
@cubewebsites
cubewebsites / application_controller.rb
Created July 22, 2012 02:09 — forked from gonzedge/application_controller.rb
Rails 3.1 - Adding custom 404 and 500 error pages
class ApplicationController < ActionController::Base
# ...
unless Rails.application.config.consider_all_requests_local
rescue_from Exception, with: :render_500
rescue_from ActionController::RoutingError, with: :render_404
rescue_from ActionController::UnknownController, with: :render_404
rescue_from ActionController::UnknownAction, with: :render_404
rescue_from ActiveRecord::RecordNotFound, with: :render_404
end
@cubewebsites
cubewebsites / gist:3156270
Created July 21, 2012 16:04 — forked from chebyte/gist:1154889
Guide for configure Tomcat6, Solr 1.4, Sunspot for Rails Application on Ubuntu 8.04 or 10.04

Guide for configure Tomcat6, Solr 1.4, Sunspot for Rails Application on Ubuntu 8.04 or 10.04

1. Install the Java JRE and Ant

for ubuntu 8.04

add the following sources to /etc/apt/sources.list

deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy multiverse
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse