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:
#fill $ip, $user, $pass with right values | |
$ip = '192.168.1.1' | |
$user = 'user' | |
$pass = 'pass' | |
$pair = "$($user):$($pass)" | |
$encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair)) | |
$basicAuthValue = "Basic $encodedCreds" | |
$Headers = @{ | |
Authorization = $basicAuthValue | |
} |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; | |
namespace SummaryTool | |
{ | |
public static class SummaryTool |
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); |
$locations = @( | |
"location1", | |
"location2", | |
"location3") | |
#download | |
$salt = Get-Date | |
$salt = [math]::abs($salt.GetHashCode()) | |
$url = "https://downloads.wordpress.org/release/fa_IR/latest.zip" | |
$zipFilePath = "$PSScriptRoot\wordpress-$salt.zip" | |
Import-Module BitsTransfer |
I hereby claim:
To claim this, I am signing this object:
; 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 |
@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; |
/* import this as mozilla format */ | |
@-moz-document domain("<your jira domain>") { | |
.ghx-summary, .user-content-block, .action-body { | |
direction: rtl; | |
} | |
} |
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) { |
# How to reformat all C# files in a solution, in Visual Studio 2012. | |
# | |
# Open Tools->Library Package Manager->Package Manager Console, and run the | |
# command below. At the end, all documents will be open in the IDE. (Low-RAM | |
# machines will have problems with large solutions.) Changed files will be | |
# modified in the IDE, and not saved to disk. You can SaveAll, then Close All | |
# if you're ready. | |
# | |
# VS2012 removed the VB-like macro language that existed in previous version of | |
# Visual Studio. However, the underlying DTE interface is still there, and you |