rails g migration add_status_to_catalogs status:catalog_status
class AddStatusToCatalogs < ActiveRecord::Migration[5.1]
def up
execute <<-SQL
BEGIN; | |
SET LOCAL request.jwt.claim.sub = '<uid>'; | |
SET LOCAL ROLE authenticated; | |
SELECT * FROM photos LIMIT 10; | |
COMMIT; |
from config.celery import celery_app | |
celery_app.control.purge() | |
inspect = celery_app.control.inspect() | |
scheduled_tasks = inspect.scheduled() | |
if scheduled_tasks: | |
for worker, tasks in scheduled_tasks.items(): | |
for task in tasks: |
import json | |
file_path = '/Users/<username>/Library/Application Support/Arc/StorableSidebar.json' | |
lists = {} | |
tabs = [] | |
with open(file_path, 'r') as f: | |
parsed_json = json.load(f) | |
items = parsed_json['sidebar']['containers'][1]['items'] |
local colors = require("kanagawa.colors").setup() | |
local theme_colors = colors.theme | |
vim.api.nvim_set_hl(0, 'HarpoonActive', { ctermbg = 0, fg = theme_colors.syn.identifier, bg = theme_colors.ui.bg }) | |
vim.api.nvim_set_hl(0, 'HarpoonNumberActive', { ctermbg = 0, fg = theme_colors.syn.number, bg = theme_colors.ui.bg }) | |
vim.api.nvim_set_hl(0, 'HarpoonInactive', { ctermbg = 0, fg = theme_colors.syn.fg, bg = theme_colors.ui.bg_p1 }) | |
vim.api.nvim_set_hl(0, 'HarpoonNumberInactive', { ctermbg = 0, fg = theme_colors.syn.number, bg = theme_colors.ui.bg_p1 }) | |
local function harpoon_files() | |
local harpoon = require("harpoon") |
var PluginParameters = [ | |
{ | |
name: "Key", | |
type: "menu", | |
valueStrings: ["A", "Bb", "B", "C", "Db", "D", "Eb", "E", "F", "Gb", "G", "Ab"], | |
minValue: 0, | |
maxValue: 11, | |
defaultValue: 0, | |
numberOfSteps: 11 | |
}, { |
. | |
.. | |
........ | |
@ | |
* | |
*.* | |
*.*.* | |
🎠|
require 'httparty' | |
require 'socket' | |
require 'cgi' | |
require 'csv' | |
require 'json' | |
require 'thor' | |
class PocketAPI | |
def initialize(consumer_key) | |
@consumer_key = consumer_key |
for ip in $(cat ips); do | |
nc -z -w 1 -v $ip 80 | |
done | |
for file in $(find . -name .git -type d -prune); do | |
cd $file | |
cd .. | |
gmg @sec register $(pwd) | |
cd ~/security | |
done |
import requests | |
import sys | |
import urllib3 | |
import argparse | |
from collections import OrderedDict | |
def main(args): | |
ranges = OrderedDict() | |
for item in args.many: |