gitflow | git |
---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
This file contains 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
import synonyms from './synonyms' | |
// Keywords that should not be stemmed | |
const swedishKeywords = ['senior', 'island'] | |
const indexConfig = { | |
settings: { | |
index: { | |
'mapping.total_fields.limit': 2200, | |
number_of_shards: 1, | |
number_of_replicas: 2, |
This file contains 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
----------------------------------- | |
Kuben Stage | |
( 1 worker, 1 thread, react-rails prerender on, no OJ, JEMALLOC OFF, 5 apps) | |
----------------------------------- | |
Total allocated: 24312661 bytes (249894 objects) | |
Total retained: 1223539 bytes (4574 objects) | |
allocated memory by gem |
This file contains 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
# config/initializers/e2e_test.rb | |
# For some situations, we need to have the e2e | |
# test to behave different in order to speed up the tests. | |
# rubocop:disable Style/ClassVars | |
if ENV.fetch('E2E_TEST', 'false') == 'true' | |
require_relative '../../lib/util/az_list_controller_util' | |
module Util | |
class AzListControllerUtil | |
class << self |
This file contains 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
import Fq from './fq' | |
import { SolrQueryOptions } from '../../types/types' | |
import SolrParams from './solrParams' | |
class SolrQuery { | |
// Filters | |
fqs: Fq[] | |
// Query | |
q: string |
This file contains 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
server { | |
listen 443; | |
server_name localhost; | |
ssl_certificate /etc/ssl/certs/STAR_incf_org-chained.crt; | |
ssl_certificate_key /etc/ssl/private/STAR_incf_org.key; | |
ssl on; | |
ssl_session_cache builtin:1000 shared:SSL:10m; |
This file contains 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
from Crypto.PublicKey import RSA | |
from Crypto.Cipher import PKCS1_v1_5 as Cipher_PKCS1_v1_5 | |
from base64 import b64decode | |
# uses pycryptodome (3.7.2) | |
file_in = open('private.pem','rb').read() | |
key = RSA.import_key(file_in) # import the public key | |
# we make our cipher | |
cipher = Cipher_PKCS1_v1_5.new(key) |
This file contains 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
# plugins/local/backend/model/fix_sort_names.rb | |
[ NameCorporateEntity, NameFamily, NamePerson, NameSoftware].each do |klass| | |
$stderr.puts "Updating ... #{klass}" | |
klass.all.each do |obj| | |
# get the jsonmodel |
This file contains 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
# to do integration tests with rack-cas, you have to use the FakeCas middleware, which intercepts CAS redirects and | |
# displays a "fake CAS" login form. This form will give a token to anything, but it has to be a user that's in the | |
# DB for the application to log the user in. | |
# To set this up, add | |
# config/environments/test.rb : | |
# config.rack_cas.fake_attributes = { 'admin': { "admin": true, "cas_directory_id": "admin", "name": "admin" } } | |
# test/test_helper.rb: | |
# require 'capybara/rails' |
This file contains 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
require 'net/http' | |
class Net::HTTP | |
singleton_class.send(:alias_method, :start_orig, :start) | |
class << self | |
def start(address, *arg, &block) | |
opt = Hash.try_convert(arg[-1]) ? arg.pop : {} | |
opt[:use_ssl] = ( [ 443, 8443 ].include?(arg.first) ) | |
arg << opt |
NewerOlder