agent_code: <Staff email>
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
# Author: pmint93 | |
# Exercise: https://www.facebook.com/groups/718037468264021/permalink/765003373567430/ | |
class Greeter | |
def self.hello(file = '') | |
yield if defined? yield | |
eval open(file).read if File.exist? file | |
end | |
end |
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
def run | |
n = 1_000 | |
id = User.first.id | |
display_name = User.only(:display_name).find(id).display_name | |
Benchmark.bm(50) do |x| | |
x.report('User.find(id).display_name') do | |
n.times{ User.find(id).display_name } | |
end |
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
// Author: pmint93 | |
function run(virtual_host, mask, auth){ | |
var trs = $('.updatable table.list tbody tr'); | |
var queues = trs.each(function(i, v){ | |
var name = $(v).find('td').eq(1).text(); | |
console.log(name); | |
if(name.match(mask)){ | |
$.ajax({ | |
method: 'GET', |
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
//Buy Form | |
jQuery.fn.fontbox_buy_form = function(variables){ | |
var z_this_form = jQuery(this); | |
var a_check_all = jQuery('#buy_check_all'); | |
var b_check_box_child_class = '.buy-check-box'; | |
var c_check_box_class = '.check-box'; | |
var d_total_price = 0; | |
var e_total_price_obj = jQuery('#buy_total_price'); | |
var f_total_check_box_child = jQuery(b_check_box_child_class).size(); | |
var g_download_iframe = jQuery('#buy_download_iframe'); |
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
#!/bin/bash | |
set -eo pipefail | |
export KUBE_NAMESPACE=test | |
export REPLICA_COUNT=3 | |
cat <<EOF | kubectl apply -f - | |
apiVersion: apps/v1beta1 | |
kind: StatefulSet |
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
version: "3.3" | |
services: | |
elasticsearch: | |
container_name: elasticsearch | |
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.3.1 | |
restart: unless-stopped | |
ports: | |
- "9200:9200" | |
environment: |