Skip to content

Instantly share code, notes, and snippets.

View MarkoZabcic's full-sized avatar

Marko Zabcic MarkoZabcic

View GitHub Profile
#
# Paperclip convert id => id_partition
#
require 'ftools' #FileUtils
class PaperclipExtend
def self.obtain_class
class_name = ENV['CLASS'] || ENV['class']
uploads_path = ENV['UPLOADS_PATH'] || ENV['uploads_path']
raise "Must specify CLASS" unless class_name
# mongo_template.rb
# MongoDB FTW!
db_name = ask('What should I call the database? ')
initializer 'database.rb', <<-CODE
MongoMapper.database = "#{db_name}-\#{Rails.env}"
CODE
file 'config/database.yml', <<-CODE
@MarkoZabcic
MarkoZabcic / footer.html
Created November 26, 2014 13:45
wkhtmltopdf test files
<!DOCTYPE html>
<!--[if IE 9 ]> <html class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Custom select</title>
<style type="text/css">
.cs {
height: 28px;
<div class="members">
<div class="avatar">
<div class="initials">JD</div>
<p>Jane Doe</p>
<small>30</small>
</div>
<div class="avatar">
<div class="initials">JD</div>
<p>Jane Doe</p>
<small>30</small>
@MarkoZabcic
MarkoZabcic / element.js
Last active May 12, 2023 08:41
Web component generator template files
import { ApplicationElement, html } from '@effectivastudio/lit-components';
import translations from './translations.js';
import style from './style.lit.css';
/**
* TODO: Description
*
* @prop exampleProp - TODO: description
*