Skip to content

Instantly share code, notes, and snippets.

View RadoMark's full-sized avatar

Radoslaw Markiewicz RadoMark

  • Wroclaw, Poland
View GitHub Profile
@RadoMark
RadoMark / Gemfile
Last active January 11, 2018 11:00
OCRbot rate limit
gem "rails", "~> 5.1.4"
gem "redis"
gem "resque"
gem "connection_pool"
gem "resque-scheduler"
gem "activejob-traffic_control"
<saml2p:Response
xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" Destination="http://oktatest.preprod.rs.cooleaf.monterail.eu/auth/okta/callback" ID="id3166083622150945988482475" InResponseTo="_e20b9000-6d30-0134-c4ca-3c764e211512" IssueInstant="2016-10-05T13:52:30.992Z" Version="2.0">
<saml2:Issuer
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">http://www.okta.com/exkq3rb4rBuWWkVwV1t6
</saml2:Issuer>
<ds:Signature
xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
-11.0=>["American Samoa", "International Date Line West", "Midway Island"],
-10.0=>["Hawaii"],
-9.0=>["Alaska"],
-8.0=>["Pacific Time (US & Canada)", "Tijuana"],
-7.0=>["Arizona", "Chihuahua", "Mazatlan", "Mountain Time (US & Canada)"],
-6.0=>["Central America", "Central Time (US & Canada)", "Guadalajara", "Mexico City", "Monterrey", "Saskatchewan"],
-5.0=>["Bogota", "Eastern Time (US & Canada)", "Indiana (East)", "Lima", "Quito"],
-4.0=>["Atlantic Time (Canada)", "Caracas", "Georgetown", "La Paz", "Santiago"],
-3.5=>["Newfoundland"],
-3.0=>["Brasilia", "Buenos Aires", "Greenland", "Montevideo"],
@RadoMark
RadoMark / batch_rendering.html
Created May 13, 2016 15:07
Batch rendering
<body ng-controller="AppCtrl">
<div ng-repeat="element in elements | limitTo: elementsLimit track by element.id">
{{ element.name }}
</div>
</body>
<script>
app.controller("AppCtrl", function($scope, Elements) {
$scope.elements = Elements.get();
renderUsersInBatchesWithDelay(10, 5, 250)
@RadoMark
RadoMark / events.js
Created October 23, 2015 06:07
Event object accessible when there is no explicit event argument.
document.addEventListener("DOMContentLoaded", function() {
console.log(event);
let button = document.getElementById('touch-me');
button.addEventListener('mouseover', function() {
console.log(event);
});
});
# RSpec configuration
RSpec.configure do |config|
config.around(:each) do |example|
Sidekiq::Testing.inline!(&example)
end
config.around(:each, sidekiq: :fake) do |example|
Sidekiq::Testing.fake!(&example)
end
@RadoMark
RadoMark / app.js
Created May 22, 2015 08:30
Ui-router dynamic ui-sref
// Generated by CoffeeScript 1.9.1
(function() {
angular.module('myapp', ['ui.router'])
.config(['$stateProvider', function($stateProvider) {
$stateProvider
.state('test', {
url: '/test/:param',
views: {
'main': {
template: '<h1>Hello!!!</h1>'
@RadoMark
RadoMark / usage.html
Last active December 26, 2019 19:14
Watchers toggler directive
<div ng-app>
<div ng-controller="TestCtrl">
<ul ng-repeat="elements in array" watchers-toggler="toggler()">
<li ng-repeat="element in elements">{{element}}</li>
</ul>
</div>
</div>
@RadoMark
RadoMark / tb-hide.js
Last active August 29, 2015 14:18
Teambook tb-hide
(function(angular) {
"use strict";
angular
.module('teambook')
.directive('tbHide', ['$timeout', '$parse', 'debug', function($timeout, $parse, debug) {
return {
restrict: 'EA',
scope: {
toggler: '&tbHide',