Skip to content

Instantly share code, notes, and snippets.

View codemilan's full-sized avatar
🪄
composing...

Milan Rawal codemilan

🪄
composing...
View GitHub Profile
@codemilan
codemilan / digital_ocean_setup.md
Created August 13, 2017 10:49 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions

DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

SSH into Root

$ ssh root@123.123.123.123

Change Root Password

* Downloaded or downloading
=============================
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html
@codemilan
codemilan / file_managers.js.coffee
Created July 31, 2017 08:55 — forked from giosakti/file_managers.js.coffee
Adding Custom Context Menu for elFinder
# ======================================================================
# admin/file_managers.js.coffee
#
# Description:
# contains snippets & functions for handling file-manager-related operation.
# ======================================================================
root = exports ? this
$ ->
<?php
class fileManagerFacade {
private $fileSync = null;
private $elFinder = null;
private $connector = null;
private $rootDirName = 'files-manager';
private $visibleFileTypes = [];
<?
class leafFile extends leafBaseObject
{
const tableName = 'leafFiles';
const defaultFolderMode = 0775; // rwx rwx r-x
const defaultFileMode = 0666; // rw- rw- rw-
const inputFieldSuffix = '_hash';
@codemilan
codemilan / leafFileSync.php
Created July 25, 2017 11:13 — forked from mungurs/leafFileSync.php
elFinder file sync. with db
<?php
class leafFileSync{
private $enableLog = false;
public function __construct($logSynchronization = false){
$this->enableLog = $logSynchronization;
}
public function sync($cmd, $result, $args, elFinder $elFinder, elFinderVolumeDriver $volume){
@codemilan
codemilan / css_resources.md
Created July 22, 2017 15:19 — forked from maxivak/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@codemilan
codemilan / commands.sh
Created December 19, 2016 05:28 — forked from ryana/commands.sh
Monkey patch Sprockets so that non-digest assets will be generated when ENV['SPROCKETS_NON_DIGEST'] is present
# Run locally
$ SPROCKETS_NON_DIGEST=true RAILS_ENV=production rake assets:precompile
# Heroku setup
$ heroku labs:enable user-env-compile
$ heroku config:add SPROCKETS_NON_DIGEST=true
@codemilan
codemilan / deploy.rb
Created June 14, 2016 12:37 — forked from toobulkeh/deploy.rb
Updated for Capistrano 3.
# encoding: UTF-8
# Place in config/deploy.rb
namespace :rails do
desc "Open the rails console on each of the remote servers"
task :console do
on roles(:app) do |host| #does it for each host, bad.
rails_env = fetch(:stage)
execute_interactively "ruby #{current_path}/script/rails console #{rails_env}"
@codemilan
codemilan / Capfile
Created June 14, 2016 07:37 — forked from chrisbloom7/Capfile
Open a Rails console via Capistrano 3 (requires capistrano-rvm gem)
require 'capistrano/rvm'