rails new your-store-namegem 'spree_backend', github: 'spree/spree'| def PERM(n) | |
| puts "#{@my_array[1..-1].inspect}" | |
| for i in 1..(1..n).inject(:*) | |
| a = 0 | |
| loop do | |
| if a > 1 && a < n+1 | |
| temp = @temp_array[a] | |
| if a - temp > 1 | |
| @temp_array[a] = temp + 1; | |
| @my_array[B(a,temp+1)], @my_array[a] = @my_array [a], @my_array[B(a,temp+1)] |
| js code: | |
| $( document ).ready(function() { | |
| function callAjax(){ | |
| var xmlhttp, account; | |
| xmlhttp = new XMLHttpRequest(); | |
| xmlhttp.onreadystatechange = function(){ | |
| if (xmlhttp.readyState == 4 && xmlhttp.status == 200){ | |
| account = document.getElementById("test"); | |
| account.innerHTML=xmlhttp.responseText; | |
| document.getElementById('delete_account').getElementsByClassName("modal-footer")[0].getElementsByClassName("btn-danger")[0].click(); |
| #!/usr/bin/env ruby | |
| # encoding: UTF-8 | |
| require 'rubygems' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| unless ARGV[0] and ARGV[1] | |
| puts "Niepoprawne użycie skryptu" | |
| puts "Sposób użycia: script.rb <miesiąc> <dzień>" |
| /* ================================================== | |
| AJAX Register Form | |
| ================================================== */ | |
| jQuery(function($){ | |
| $("form#sign_up_user").submit(function(e){ | |
| e.preventDefault(); | |
| var user_info = $(this).serialize(); | |
| $.ajax({ | |
| type: "POST", | |
| url: $(this).attr('action'), |
| " Pathogen ******************************************************************* | |
| call pathogen#incubate() | |
| call pathogen#helptags() | |
| " General ******************************************************************** | |
| set nocompatible | |
| set encoding=utf-8 | |
| set fileencodings=utf-8,latin2 | |
| " Autowrite current buffer on switch |
| [user] | |
| email = [email protected] | |
| name = Miłosz Osiński | |
| [alias] | |
| br = branch | |
| co = checkout | |
| ci = commit | |
| df = diff | |
| lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit |