Skip to content

Instantly share code, notes, and snippets.

View Chocksy's full-sized avatar
🏠
Working from home

Ciocanel Razvan Chocksy

🏠
Working from home
View GitHub Profile
@f0ster
f0ster / main.py
Created August 17, 2020 14:40
quantconnect wheel strategy example
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@urkle
urkle / README.md
Last active December 4, 2020 18:45
GitHub milestones user script

GitHub milestones user script

What it does

This adds a new milestones nav menu next to pull requests.

Installation

Install Tampermonkey in your broser.

@basiszwo
basiszwo / active_record_query_locator.rb
Created April 23, 2018 13:09
Find active record query location
module ActiveRecord
class QueryLocator
def call(name, started, finished, unique_id, payload)
# filter caller locations to application backtrace (filter all gem calls)
# see http://ruby-doc.org/core-2.5.0/Kernel.html#method-i-caller_locations for more options
caller_names = caller_locations.select { |line| line.to_s =~ /#{Rails.root.to_s}/ }
# use the last caller in backtrace
caller_name = caller_names.first
Rails.logger.debug ["Notification:", name, started, finished, unique_id, caller_name, payload].join(" - ")
@kimobrian
kimobrian / circleci-heroku-continuous-deployment2.0.md
Created March 6, 2018 09:17 — forked from lauraturk/circleci-heroku-continuous-deployment2.0.md
instructions for deploying from circleci2.0 to heroku
@Chocksy
Chocksy / kill_sidekiq_job.rb
Last active July 16, 2024 16:24
Kill sidekiq jobs by process id for busy jobs and by jid for other sets.
# FOR BUSY JOBS
# take the process_id from the /busy page in sidekiq and kill the longest running one.
workers = Sidekiq::Workers.new
long_process_id = 'integration.3:4:71111aaa111' # Eg: 'integration.3:4:71d1d7f4ef5a'
workers.each do |process_id, thread_id, work|
process = Sidekiq::Process.new('identity' => process_id)
process.stop! if process_id == long_process_id
end
# FOR SCHEDULED JOBS
@ArthurN
ArthurN / installation.sh
Last active July 2, 2020 07:29
From pow to puma-dev on macOS keeping .dev domains
# Why:
# 1) Chrome 63 (Dec 8) breaks .dev domains by forcing HTTPS: https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/
# 2) Pow is at EOL, superceded by puma-dev (see http://pow.cx/manual, 6 Version History, 0.6.0, Dec 8 2017)
# Uninstall pow
curl get.pow.cx/uninstall.sh | sh
# If you use powder, you can remove it as well
gem uninstall powder
@rambabusaravanan
rambabusaravanan / README.md
Last active March 6, 2021 13:37
GitLab CI Configuration YAML

Firebase Deployment

Step 1: Get Token

Generate the firebase token from your terminal using the command $ firebase login:ci

Waiting for authentication...

✔ Success! Use this token to login on a CI server:

1/VXXXXXXX--YOUR-FIREBASE-CI-TOKEN--XXXXXh92o

@Lukom
Lukom / email_previews.rb
Last active April 2, 2021 18:43
Preview Emails in ActiveAdmin / Rails 5.1
# app/admin/email_previews.rb
ActiveAdmin.register_page 'Email Previews' do
menu parent: 'dashboard', priority: 10
content do
div '1'
end
sidebar 'Mail Previews' do
Dir['test/mailers/previews/**/*_preview.rb'].each do |preview_path|
@LeonardoCardoso
LeonardoCardoso / GPG-Tower
Last active April 21, 2023 11:53
How to setup Tower to use the GPG Suite
# GPG on Tower