Skip to content

Instantly share code, notes, and snippets.

View ajai8085's full-sized avatar
🎯
Focusing

Ajai ajai8085

🎯
Focusing
View GitHub Profile
@ajai8085
ajai8085 / SinglePage.Mvvm.WithEventAggregator.cs
Last active May 8, 2017 23:52
Poor Man's Single Page MVVM with Event Aggregator (Missing validation)
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
using System.Windows;
@ajai8085
ajai8085 / Powershell
Created August 14, 2017 03:38 — forked from nulltier/Powershell
usefull commands for ssh-agent in powershell
Get-SshAgent - Returns the process ID of the running agent, or zero if there is not one currently running.
Start-SshAgent - Starts the agent process and sets the appropriate environment variables for SSH.
Stop-SshAgent - Stops the process if there is one and unsets the variables.
Add-SshKey - Instructs the agent to add the given key to itself. This will cause you to be prompted for the passphrase.
# SSH Agent Functions
# Mark Embling (http://www.markembling.info/)
#
# How to use:
# - Place this file into %USERPROFILE%\Documents\WindowsPowershell (or location of choice)
# - Import into your profile.ps1:
# e.g. ". (Resolve-Path ~/Documents/WindowsPowershell/ssh-agent-utils.ps1)" [without quotes]
# - Enjoy
#
# Note: ensure you have ssh and ssh-agent available on your path, from Git's Unix tools or Cygwin.
@ajai8085
ajai8085 / gist:18617a2eed10305097fb08e5dda6e63c
Created August 17, 2017 05:24 — forked from learncodeacademy/gist:5f84705f2229f14d758d
Getting Started with Vagrant, SSH & Linux Server Administration
@ajai8085
ajai8085 / TSQL-to-POCO
Created August 21, 2017 01:16 — forked from joey-qc/TSQL-to-POCO
A simple TSQL script to quickly generate c# POCO classes from SQL Server tables and views. You may tweak the output as needed. Not all datatypes are represented but this should save a bunch of boilerplate coding. USAGE: Run this query against the database of your choice. The script will loop through tables, views and their respective columns. Re…
declare @tableName varchar(200)
declare @columnName varchar(200)
declare @nullable varchar(50)
declare @datatype varchar(50)
declare @maxlen int
declare @sType varchar(50)
declare @sProperty varchar(200)
DECLARE table_cursor CURSOR FOR
@ajai8085
ajai8085 / XUbuntu.dev.16.10.md
Created October 22, 2017 01:57
Settingup Ubuntu(XUbuntu 16.10) Development environment

Soon after the installation XUBUNTU 17.10 issue the command Sudo apt-get update sudo apt-get install htop sudo apt-get install build-essential sudo apt-get install apt-transport-https ca-certificates curl software-properties-common

#Install JDK on Ubuntu

--uninstall all versions of java

@ajai8085
ajai8085 / .gitconfig
Created October 23, 2017 03:57
Sample GitConfig c:\users\UserName\.gitconfig
[user]
name = name
email = name@email.com
[user]
email = name@email.com
[filter "lfs"]
smudge = git-lfs smudge -- %f
required = true
clean = git-lfs clean -- %f
[alias]
@ajai8085
ajai8085 / Program.cs
Created November 13, 2017 03:44
StackExchange.Redis extensions for HashSet
using System;
using System.Collections.Generic;
using System.Linq;
using StackExchange.Redis;
namespace RedisPlayground
{
class Program
{
static void Main(string[] args)
@ajai8085
ajai8085 / docker-compose.yml
Created February 3, 2018 12:58
Docker compos with redis - postgres sql
# Use postgres/example user/password credentials
version: '3.1'
services:
db:
image: postgres:9.6.6
ports:
- "5432:5432"
restart: always