Skip to content

Instantly share code, notes, and snippets.

export type TaskPriority = "user-blocking" | "user-visible" | "background";
export type SchedulerPostTaskOptions = {
// This priority is immutable and overrides the
// TaskController's priority.
priority?: TaskPriority;
delay?: number;
signal?: TaskSignal;
};
@abulava
abulava / clear-sidekiq-jobs.sh
Created September 19, 2022 18:28 — forked from wbotelhos/clear-sidekiq-jobs.sh
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@abulava
abulava / genericStart.sh
Created November 15, 2018 18:21 — forked from mastertheif/genericStart.sh
docker swarm update configs
#!/usr/bin/env bash
# Use this script to have the ability to update configs in swarm
#
#
# =============================================================================
# macOS specifics:
# You need the bash 4 and md5sum commands
# $ brew install md5sha1sum bash
set -e
@abulava
abulava / perf.rake
Created November 18, 2016 11:34
derailed perf.rake with custom auth
require 'bundler'
Bundler.setup
require 'derailed_benchmarks'
require 'derailed_benchmarks/tasks'
class MyCustomAuth < DerailedBenchmarks::AuthHelper
attr_writer :user
def user

Keybase proof

I hereby claim:

  • I am abulava on github.
  • I am abulava (https://keybase.io/abulava) on keybase.
  • I have a public key whose fingerprint is B43D A23B 2C1D F317 8FC8 6502 FC21 1515 87D6 651B

To claim this, I am signing this object:

@abulava
abulava / gist:4125f0e9654bc5235370e1e9f325010b
Created August 25, 2016 13:10 — forked from tiernano/gist:4344701
IPv6 Firewall rules for a MikroTik router to allow outgoing connections, but block incoming, unless they are responses...
/ipv6 firewall filter
add action=accept chain=input comment="Allow established connections" connection-state=established disabled=no
add action=accept chain=input comment="Allow related connections" connection-state=related disabled=no
add action=accept chain=input comment="Allow limited ICMP" disabled=no limit=50/5s,5 protocol=icmpv6
add action=accept chain=input comment="Allow UDP" disabled=no protocol=udp
add action=drop chain=input comment="" disabled=no
add action=accept chain=forward comment="Allow any to internet" disabled=no out-interface=sit1
add action=accept chain=forward comment="Allow established connections" connection-state=established disabled=no
add action=accept chain=forward comment="Allow related connections" connection-state=related disabled=no
add action=drop chain=forward comment="" disabled=no
@abulava
abulava / curl-ttfb.sh
Created August 14, 2016 07:59 — forked from acdha/curl-ttfb.sh
Use curl to measure and report HTTP response times (pre-, start- and total transfer)
#!/bin/bash
#
# Report time to first byte for the provided URL using a cache buster to ensure
# that we're measuring full cold-cache performance
while (($#)); do
echo $1
curl -so /dev/null -H "Pragma: no-cache" -H "Cache-Control: no-cache" \
-w "%{http_code}\tPre-Transfer: %{time_pretransfer}\tStart Transfer: %{time_starttransfer}\tTotal: %{time_total}\tSize: %{size_download}\n" \
"$1?`date +%s`"
@abulava
abulava / s3-bucket-move
Created July 26, 2016 12:31 — forked from alanwill/s3-bucket-move
Move an S3 bucket to a different region
aws s3 sync s3://oldbucket s3://newbucket --source-region us-west-1 --region us-west-2
# applescript
# add login item
osascript -e 'tell application "System Events" to make login item at end with properties {name: "Notes",path:"/Applications/Notes.app", hidden:false}'
# delete login item
osascript -e 'tell application "System Events" to delete login item "itemname"'
# list loginitems
osascript -e 'tell application "System Events" to get the name of every login item'
@abulava
abulava / local.mount.backups.plist
Last active July 7, 2016 08:42
Save to /Library/LaunchAgents/ and make backups.sparsebundle group-writable (recursively)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>RunAtLoad</key>
<true/>
<key>Label</key>
<string>local.mount.backups</string>
<key>ProgramArguments</key>
<array>