Skip to content

Instantly share code, notes, and snippets.

View jackliusr's full-sized avatar

Jack Liu Shurui jackliusr

View GitHub Profile
@stevegrossi
stevegrossi / jmeter.rb
Last active March 19, 2018 16:16
Sample JMeter test plan using the ruby-jmeter gem
#!/usr/bin/env ruby
require 'ruby-jmeter'
test do
defaults domain: 'beta.stevegrossi.com'
cookies clear_each_iteration: true

#FOR MULTIPLE REDIS INSTANCE INSTALLATION ON RHEL7+ USE THE FOLLOWING PATHS AND SETUP PROCESS:

  • create a new redis .conf file
$ cp /etc/redis.conf /etc/redis-xxx.conf
  • edit /etc/redis-xxx.conf, illustrated as below
@mateuszwenus
mateuszwenus / save_restore_dependencies.sql
Last active April 11, 2024 05:49
PostgreSQL: How to handle table and view dependencies
create table deps_saved_ddl
(
deps_id serial primary key,
deps_view_schema varchar(255),
deps_view_name varchar(255),
deps_ddl_to_run text
);
create or replace function deps_save_and_drop_dependencies(p_view_schema varchar, p_view_name varchar) returns void as
$$
@trhura
trhura / combinations.clj
Created December 26, 2013 09:06
Combinations generator in Clojure
(defn combinations [lst k]
(letfn [(combinator [x xs]
(if (= (count x) k)
[x]
(when (not (empty? xs))
(concat (combinator (concat x [(first xs)]) (rest xs))
(combinator x (rest xs))))))]
(combinator nil lst)))
;; user> (combinations (range 1 6) 2)