Batman animated and JL viewing order.
Canon 1:
- Batman: mask of Phantasm *
- Batman and Mr. Freeze: SubZero
- Batman: Mystery of Batwoman
Canon 2: If you plan to watch Justice league too then refer JL canon #2
- Son of Batman
- Batman vs Robin
(defun camelCaseFileName() | |
"Get the camel case version of filename. Usefull when generating class name of ruby(or any other lang) file. You can use it in a yasnippet." | |
;; # -*- mode: snippet -*- | |
;; # name: cls | |
;; # key: cls | |
;; # -- | |
;; class `(camelCaseFileName)` | |
;; $0 | |
;; end | |
(interactive) |
require 'benchmark/ips' | |
require 'active_support/all' | |
LOOP_FOR = 100_000 | |
Time.zone = 'Hawaii' | |
DATE = Time.current.getutc | |
# a certain custom time format | |
Time::DATE_FORMATS[:local_db] = |
function kgs(){ | |
local NAMESPACE="${2:-default}" | |
echo -e "secret => ${1} namespace => ${NAMESPACE}" | |
kubectl get secrets $1 -n $NAMESPACE -o json | jq '.data[] | @base64d | fromjson' | |
} |
A very simple generic log formatter for sneakers and rails. |
module ArHelpers | |
def listen_to_insert_ar_calls(table) | |
ActiveSupport::Notifications | |
.subscribe('sql.active_record') do |_, _, _, _, details| | |
if details[:sql] =~ /INSERT INTO `#{table}`/ | |
@sql = details[:sql] | |
end | |
end | |
end | |
end |
require 'rails_helper' | |
describe Api::V1::CheckoutsController, type: :request do | |
let(:user) do | |
FactoryGirl.create(:user, current_balance: 100_000) | |
end | |
describe 'check concurrency' do | |
it 'send multiple same requests', truncation_only: true do | |
FactoryGirl.create(:item, |
Batman animated and JL viewing order.
Canon 1:
Canon 2: If you plan to watch Justice league too then refer JL canon #2
(defun compile-current-cpp-file () | |
"Compile and run current file on eshell" | |
(interactive) | |
(let ((filename (buffer-file-name))) | |
(with-selected-window (get-buffer-window "*eshell*") | |
(recenter) | |
(insert "g++ -std=c++11 " filename " -o a.out && ./a.out") | |
(eshell-send-input) | |
(erase-buffer)) | |
(message "File '%s' is compiled and ran" filename))) |
module Archivable | |
extend ActiveSupport::Concern | |
included do | |
default_scope -> { where(is_archived: false) } | |
scope :with_archived, -> { all.unscope(where: :is_archived) } | |
scope :only_archived, -> { with_archived.where(is_archived: true) } | |
end |
#include <algorithm> | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
typedef vector<int> vi; | |
typedef vector<vi> vvi; | |
int countI; | |
int countDP; | |
int countKadne; |