Skip to content

Instantly share code, notes, and snippets.

@ahmadalli
ahmadalli / 49-haproxy.conf
Last active October 4, 2023 19:36
Json Logging in HAProxy: The Right Way
# Create an additional socket in haproxy's chroot in order to allow logging via
# /dev/log to chroot'ed HAProxy processes
$AddUnixListenSocket /var/lib/haproxy/dev/log
# Send HAProxy messages to a dedicated logfile
:programname, startswith, "haproxy"
:syslogfacility-text, startswith, "local0" {
/var/log/haproxy.log
@@<graylog host>:<syslog input port>;RSYSLOG_SyslogProtocol23Format
stop
@ahmadalli
ahmadalli / get-k8s-envs.sh
Last active March 25, 2020 07:43
Get All Envs on Kubernetes Cluster
# moved to https://github.com/ahmadalli/OneLiners#getting-envs-from-all-over-the-cluster
@ahmadalli
ahmadalli / youtrack-notify-slack.js
Created July 21, 2019 08:35 — forked from rushimusmaximus/youtrack-notify-slack.js
YouTrack JavaScript Workflow example: Post to Slack on specific issue state changes
var entities = require('v1/entities');
var http = require('v1/http');
exports.rule = entities.Issue.onChange({
title: 'Notify-slack',
action: function(ctx) {
var issue = ctx.issue;
if (issue.becomesReported || issue.becomesResolved || issue.becomesUnresolved) {
@ahmadalli
ahmadalli / rtl.css
Last active June 22, 2019 07:06
RTL Jira with UserStyles
/* import this as mozilla format */
@-moz-document domain("<your jira domain>") {
.ghx-summary, .user-content-block, .action-body {
direction: rtl;
}
}
@ahmadalli
ahmadalli / all.css
Last active June 21, 2019 10:24
Wordpress Neve Persian Improvement.css
@import url('https://cdn.rawgit.com/rastikerdar/vazir-font/v20.1.0/dist/font-face.css');
@import url('https://cdn.rawgit.com/rastikerdar/shabnam-font/v4.0.0/dist/font-face.css');
h1, h2, h3, h4, h5, h6, .widget .widget-title, .site-description, .site-title, .entry-title, .entry-title a, .comments-title, .nav-menu a, widget-title {
font-family: Shabnam, "Source Sans Pro", Helvetica, sans-serif;
}
*, .entry-content {
font-family: Vazir;
@ahmadalli
ahmadalli / delete-evicted.sh
Last active March 25, 2020 07:45
Deleting all pods that are stuck on terminating state or evicted
# moved to https://github.com/ahmadalli/OneLiners#delete-evicted-pods
@ahmadalli
ahmadalli / GL503.ahk
Last active June 28, 2018 09:53
AutoHotKey scripts used for making my day to day life easier
; Adding CapsLock + Arrow Keys as `Home`, `End`, `Page Up`, and `Page Down` shortcuts.
; It's useful in Asus GL503 Keyboard which you can't use numpad and these keys (except for `Home`) simultaneously
CapsLock & Left::Home
CapsLock & Right::End
CapsLock & Up::PgUp
CapsLock & Down::PgDn
@ahmadalli
ahmadalli / Profile.ps1
Last active March 25, 2020 07:53
nuget one-line multi package install
# moved to https://github.com/ahmadalli/OneLiners#oneliner-multiple-package-installer
@ahmadalli
ahmadalli / inside-console.js
Last active March 25, 2020 07:49
scroll to the end of a lazy laded page
// moved to https://github.com/ahmadalli/OneLiners#scrool-to-the-buttom-of-lazy-loaded-page

Keybase proof

I hereby claim:

  • I am ahmadalli on github.
  • I am ahmadalli (https://keybase.io/ahmadalli) on keybase.
  • I have a public key whose fingerprint is 16EE A3FE 6D21 507A 12B1 DAC5 DA22 1805 3832 A5AC

To claim this, I am signing this object: