I hereby claim:
- I am apokly on github.
- I am apokly (https://keybase.io/apokly) on keybase.
- I have a public key whose fingerprint is 3CAB 5BC1 0A6E F3DB 012F E2AC 2FDD CEBB 8124 C1EF
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
# Requirements : | |
# Be logged using Github CLI : https://github.com/cli/cli | |
# Place this script in a folder at same level than other repositories, i.e. : | |
# - ./Workspace/api-core | |
# - ./Workspace/mep/matera_mep.rb | |
# Usage : | |
# * ruby matera_mep.rb [repo] |
# DO NOT FORGET TO SET YOUR ENVIRONMENT VARIABLES : AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY | |
# ZIP stage is using shell runner (quick start), UPLOAD stage is using docker runner | |
# Usage on Wordpress : wp plugin install [S3_PATH]/xxx.zip --activate --force (update) | |
stages: | |
- zip | |
- upload | |
zip_plugin: | |
stage: zip |
#!/usr/bin/env ruby | |
require 'bundler' | |
puts Bundler::LockfileParser.new(Bundler.read_file(Bundler.default_lockfile)).specs.find { |s| s.name == ARGV[0] }.version.version | |
# Requires `Gemfile.lock` file with required dependency included (eg: `bundle install rubocop`) | |
# Use case : gem install rubocop -v $(ruby bundler_version.rb rubocop) --no-document | |
# Can be useful in CI jobs (do not install all dependencies through `bundle install` when you only need to pass linter for example) |
# DO NOT FORGET TO SET YOUR ENVIRONMENT VARIABLES : AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION (protected) | |
stages: | |
- minify | |
- upload | |
minify_js: | |
image: node:latest | |
stage: minify | |
before_script: |
import http.server | |
import cgi | |
import base64 | |
import json | |
from urllib.parse import urlparse, parse_qs | |
class CustomServerHandler(http.server.BaseHTTPRequestHandler): | |
def do_HEAD(self): |
I hereby claim:
To claim this, I am signing this object:
From github.com/bmuller/bandit/blob/master/whybandit.rdoc
In a typical A/B test, two alternatives are compared to see which produces the most “conversions” (that is, desired results). For instance, if you have a website with a big “Sign Up” button that you want visitors to click, you may wish to choose different background colors. Under typical A/B testing guildlines, you would pick a number (say, N) of users for a test and show half of them one color and half of them another color. After users are shown the button, you record the number of clicks that result from viewing each color. Once N users view one of the two alternatives, a statistical test (generally categorical, like a Chi-Square Test or a G-Test) is run to determine whether or not the number of clicks (aka, “conversions”) for one color were higher than the number of clicks for the other color. This test determines whether the difference you observed was likely due simply to chance or whether the difference
module PaginateHelper | |
class BootstrapRenderer < WillPaginate::ActionView::LinkRenderer | |
def prepare collection, options, template | |
options[:params] ||= Hash.new | |
options[:params]['_'] = nil | |
super(collection, options, template) | |
end | |
protected |
class ConvertToUtf8 | |
DEFAULT_CONVERT_CHARACTER = 'utf8' | |
DEFAULT_CONVERT_COLLATE = 'utf8_general_ci' | |
DEFAULT_CONVERT_COLUMNS = { | |
# ActiveRecord: SQL | |
string: 'varchar(255)', | |
text: 'text' | |
} |