Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔

ahmadali shafiee ahmadalli

🤔
View GitHub Profile
@ahmadalli
ahmadalli / get-k8s-envs.sh
Last active Mar 25, 2020
Get All Envs on Kubernetes Cluster
View get-k8s-envs.sh
# moved to https://github.com/ahmadalli/OneLiners#getting-envs-from-all-over-the-cluster
@ahmadalli
ahmadalli / youtrack-notify-slack.js
Created Jul 21, 2019 — forked from rushimusmaximus/youtrack-notify-slack.js
YouTrack JavaScript Workflow example: Post to Slack on specific issue state changes
View youtrack-notify-slack.js
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 Jun 22, 2019
RTL Jira with UserStyles
View rtl.css
/* 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 Jun 21, 2019
Wordpress Neve Persian Improvement.css
View all.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 Mar 25, 2020
Deleting all pods that are stuck on terminating state or evicted
View delete-evicted.sh
# moved to https://github.com/ahmadalli/OneLiners#delete-evicted-pods
@ahmadalli
ahmadalli / GL503.ahk
Last active Jun 28, 2018
AutoHotKey scripts used for making my day to day life easier
View GL503.ahk
; 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 Mar 25, 2020
nuget one-line multi package install
View Profile.ps1
# moved to https://github.com/ahmadalli/OneLiners#oneliner-multiple-package-installer
@ahmadalli
ahmadalli / inside-console.js
Last active Mar 25, 2020
scroll to the end of a lazy laded page
View inside-console.js
// moved to https://github.com/ahmadalli/OneLiners#scrool-to-the-buttom-of-lazy-loaded-page
View keybase.md

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:

@ahmadalli
ahmadalli / load.cs
Last active Jan 27, 2017
Dynamically load Entity Configurations in EF CodeFirst
View load.cs
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
var typesToRegister = Assembly.GetAssembly(typeof(Context)).GetTypes()
.Where(type => type.Namespace != null)
.Where(type => type.BaseType.IsGenericType && type.BaseType.GetGenericTypeDefinition() == typeof(EntityTypeConfiguration<>)).ToList();
foreach (var type in typesToRegister)
{
dynamic configurationInstance = Activator.CreateInstance(type);
modelBuilder.Configurations.Add(configurationInstance);
You can’t perform that action at this time.