curl -u Jenkins:Jenkins -H "Content-Type: application/json" -X POST http://localhost:7990/rest/build-status/1.0/commits/$GIT_COMMIT -d '{"state":"INPROGRESS","key": "'$BUILD_TAG'","name": "Jenkins-'$BUILD_DISPLAY_NAME'", "url": "'$BUILD_URL'/consoleText","description": "Changes by '$GIT_COMMITTER_EMAIL'"}'
#!/bin/sh
cd ${WORKSPACE}
SUCCESS=true
gem install bundler --no-rdoc --no-ri || SUCCESS=false
bundle install || SUCCESS=false
bundle exec rake db:create || SUCCESS=false
This file contains hidden or 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
Coverage Badges |
This file contains hidden or 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
coś takiego: | |
# frozen_string_literal: true | |
class Shop::Settings | |
ALL_TERMINAL_LOCKERS_OPEN_ENABLED = "ALL_TERMINAL_LOCKERS_OPEN_ENABLED" | |
API_GATEWAY_NAME = "api_gateway_name" | |
ASSISTANCE_ENABLED = "ASSISTANCE_ENABLED" | |
CHECK_IN_FREE_LOCKER_ENABLED = "CHECK_IN_FREE_LOCKER_ENABLED" | |
CHECK_IN_MAILER_ENABLED = "CHECK_IN_MAILER_ENABLED" | |
CUSTOMER_CAR_SERVICE_SMS_ENABLED = "CUSTOMER_CAR_SERVICE_SMS_ENABLED" |
This file contains hidden or 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
$cropper_width = $data['additional_product_information']['cropper_width']; | |
$cropper_height = $data['additional_product_information']['cropper_height']; | |
$cropper_x = $data['additional_product_information']['cropper_x']; | |
$cropper_y = $data['additional_product_information']['cropper_y']; | |
$filename = $data['additional_product_information']['thumbnail_url']; | |
header('Content-type: image/jpg'); | |
header('Content-Disposition: attachment; filename='.$src); | |
$image = imagecreatefromjpeg($filename); | |
$crop = imagecreatetruecolor($cropper_width,$cropper_height); | |
imagecopy ( $crop, $image, 0, 0, $cropper_x, $cropper_y, $cropper_width, $cropper_height ); |
This file contains hidden or 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
def index | |
puts '!!!!!!' | |
if current_user.sportsman? | |
@time_range = Date.today.at_beginning_of_month-6.days..Date.today.at_end_of_month+6.days | |
@trainings = Training.includes(:trainings_executions).where(start_date: @time_range, trainings_executions: {sportsman_id: current_user.id}).order(:start_time) | |
else | |
date = params[:start_date] ? params[:start_date].to_date : Date.today | |
@time_range = date.at_beginning_of_week..date.at_end_of_week | |
@training = Training.new | |
if current_user.coach? |
This file contains hidden or 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
======= Prolbem ================================================================================================================= | |
I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute: | |
rake db:create , command I get: | |
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) | |
HINT: Use the same encoding as in the template database, or use template0 as template. | |
: CREATE DATABASE "my_db_name" ENCODING = 'unicode'....... | |
================================================================================================================================= |
This file contains hidden or 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() { | |
$('input[type=number]').keydown(function (e) { | |
var key = e.which || e.keyCode; | |
if (!e.shiftKey && !e.altKey && !e.ctrlKey && | |
// numbers | |
key >= 48 && key <= 57 || | |
// Numeric keypad | |
key >= 96 && key <= 105 || | |
// comma, period and minus, . on keypad |
This file contains hidden or 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
puts "Podaj tekst:" | |
t = gets.chomp.split(//) | |
puts "Podaj wzorzec:" | |
p = gets.chomp.split(//) | |
n, m = t.length, p.length | |
pPos, iPos = 0, 0 | |
while iPos < n |
This file contains hidden or 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
#!/usr/bin/ruby | |
require 'active_support/all' | |
@a = Array(1..ARGV[0].to_i) | |
def funkcja1(i) | |
if index = @a.index(i) | |
temp = @a.take(index).combination(2).to_a.delete_if { |a| a.sum != i } | |
@a.delete(i) if temp.empty? | |
puts "Funkcja1 i: #{i}" |
This file contains hidden or 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
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)] |
NewerOlder