Skip to content

Instantly share code, notes, and snippets.

Avatar

Michał Połtyn Holek

  • London/Wrocław/Tarquinia
View GitHub Profile
View gist:09a2e46dfc5134eb7e6866e3390a2172
### Keybase proof
I hereby claim:
* I am holek on github.
* I am holek (https://keybase.io/holek) on keybase.
* I have a public key ASDyYLw2fQjCrNuRqzA8D2-VZcOj3vgmbdteO7Gt-oIhyQo
To claim this, I am signing this object:
@Holek
Holek / README.md
Created Oct 24, 2014
Jenkins build categorization by month
View README.md
  1. Open a project in Jenkins
  2. Click "more" in Build History (this should show all builds in that project)
  3. Open console, paste in above code.
  4. Inspect buildStats object.
@Holek
Holek / arel_mssql_join_visitor_for_update_statement.rb
Created May 1, 2014
Arel 3.0.3 Visitor for MSSQL UPDATE with JOIN monkey patch
View arel_mssql_join_visitor_for_update_statement.rb
module Arel
module Visitors
class MSSQL
private
def visit_Arel_Nodes_UpdateStatement o
if o.orders.empty? && o.limit.nil?
wheres = o.wheres
else
key = o.key
@Holek
Holek / README.md
Created Mar 13, 2014
Ruby on Rails/ActiveRecord 3.2.17 monkey patch for lock requests
View README.md

This monkey patch allows you to use lock hints defined by AR-JDBC adapter for MSSQL with Rails 3.2.

It will not work with Rails 3.1 or 4. It might as well not work with anything else than MSSQL.

Not like it has to...

It will work with this fork, though.

@Holek
Holek / view_object.rb
Created Mar 6, 2014
ActiveRecord concern for MSSQL views
View view_object.rb
# Usage:
#
# class SomeView < ActiveRecord::Base
# include ViewObject
# end
#
# SomeView.view_sql #=> prints out MsSQL view SQL statement
module ViewObject
extend ActiveSupport::Concern
@Holek
Holek / dabblet.css
Created Feb 15, 2014
Construction site
View dabblet.css
/**
* Construction site
*/
ul,
ol {
margin-top: 0;
margin-bottom: 10px;
}
@Holek
Holek / dabblet.css
Created Feb 15, 2014
Construction site
View dabblet.css
/**
* Construction site
*/
ul,
ol {
margin-top: 0;
margin-bottom: 10px;
}
@Holek
Holek / dabblet.css
Created Feb 15, 2014
Construction site
View dabblet.css
/**
* Construction site
*/
ul,
ol {
margin-top: 0;
margin-bottom: 10px;
}
@Holek
Holek / dabblet.css
Created Feb 25, 2013
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
.apple {
display:block;
height: 273px;
width: 1024px;
background-color: #EA294C;
background-image: -webkit-linear-gradient(left, #EA294C, #EA294C 16.6%, #EA6F3C 16.6%,
@Holek
Holek / dabblet.css
Created Feb 19, 2013
text-like inputs
View dabblet.css
/**
* text-like inputs
*/
table input[type="text"] {
border: 1px solid transparent;
background: white;
padding: 3px 5px;
}
table input[type="submit"] {