- Setup
- Swapfile
- NGINX
- ElasticSearch
- RVM
- Rails
- Postgres
- Capistrano
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/abelorian/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="robbyrussell" | |
# Uncomment the following line to use case-sensitive completion. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="control-group"> | |
<%= form.label :plan_image %> | |
<div class="controls"> | |
<div id="plan_image_preview_block" class="imageUpload imageUpload-16_9" style="<%= 'display: none;'.html_safe if @plan.try(:plan_image).try(:url).nil? %>"> | |
<div class="imageUpload-media" id="plan_image_preview" style="background-image: url(<%= @plan.try(:plan_image).try(:url) || '' %>);"></div> | |
</div> | |
<div class="input-file-wrapper"> | |
<a class="btn btn--s btn--secondary"> | |
<% if @plan.plan_image.present? && @plan.plan_image.file.exists? %> | |
<i class="icon icon-16 flaticon stroke photo-1"></i> Change image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dbcache=30 | |
maxmempool=10 | |
maxconnections=3 | |
disablewallet=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To do: add validations | |
class GenericWorker < ApplicationWorker | |
def perform(options) | |
klass = options["klass"].constantize | |
if options["id"].present? | |
if options[:params].present? | |
klass.find(options["id"]).send options["method_name"], options["params"] | |
else | |
klass.find(options["id"]).send options["method_name"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "conekta" | |
Conekta.api_key = "key_mkdVk1gAJEDrqbgie7wmwA" | |
Conekta.api_version = "2.0.0" | |
customer = Conekta::Customer.create({ | |
:name => 'Paying User', | |
:email => '[email protected]', | |
:phone => '+52181818181', | |
:payment_sources => [{ | |
:type => 'card', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadFacebookShare(){$("body").append('<div id="fb-root"></div>'),window.fbAsyncInit=function(){FB.init({appId:"132119896836620",xfbml:!0,version:"v2.9"}),FB.AppEvents.logPageView()};var e={en:"en_US",es:"es_LA"}[$("html").attr("lang")]||"en_US";!function(t,n,i){var a,o=t.getElementsByTagName(n)[0];t.getElementById(i)||(a=t.createElement(n),a.id=i,a.src="//connect.facebook.net/"+e+"/sdk.js",o.parentNode.insertBefore(a,o))}(document,"script","facebook-jssdk")}function identificationFormat(e,t,n){var i=identificationClasses[t.toLowerCase()]||identificationClasses.defaultClass,a=i[n.toLowerCase()]||i.c;return new a(e).toString()}function identificationValid(e,t,n){var i=identificationClasses[t.toLowerCase()]||identificationClasses.defaultClass,a=i[n.toLowerCase()]||i.c;return new a(e).isValid()}!function(e,t){function n(e){var t=fe[e]={};return Q.each(e.split(te),function(e,n){t[n]=!0}),t}function i(e,n,i){if(i===t&&1===e.nodeType){var a="data-"+n.replace(_e,"-$1").toLowerCase();if(i=e.getAttribute(a),"s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "prime" | |
primes = [] | |
i = 7 | |
loop do | |
primes << i if Prime.prime?(i) | |
break if primes.length >= 60 | |
i += 10 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net | |
* | |
* Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt | |
*/ | |
/** | |
* This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var inputsChanged = false; | |
$(document).on('change', 'table#products-table', function(){ | |
if(!inputsChanged){ | |
window.onbeforeunload = function(){ return "Do you want to leave this site?" }; | |
} | |
inputsChanged = true; | |
}); |