Skip to content

Instantly share code, notes, and snippets.

View c1982's full-sized avatar
🍄
yeah!

Oğuzhan Yılmaz c1982

🍄
yeah!
View GitHub Profile
SELECT mail.mail_name,domains.name,accounts.password,domains.status
FROM domains
LEFT JOIN mail ON mail.dom_id = domains.id
LEFT JOIN accounts ON accounts.id = mail.account_id
WHERE mail.mail_name <> ''
SELECT cr_date,cname,pname,login,status,passwd,email FROM clients
@c1982
c1982 / gist:2878287
Created June 5, 2012 21:53
Interface
namespace ConsoleApplication6
{
using System;
class Program
{
static void Main(string[] args)
{
var a = new MyClass();
@c1982
c1982 / gist:2855326
Created June 1, 2012 21:44
Assembly String
private string AssemblyString(string username, string password)
{
return String.Format(@"using FluentMigrator;
namespace UpdatePass
{
[Migration({2})]
public class Class1 : FluentMigrator.Migration
{
public override void Down()
{
@c1982
c1982 / gist:2855259
Created June 1, 2012 21:34
Generate Assembly
private string GenerateAssembly(string username, string password, string _assemblyPath)
{
var _result = "";
using (var csc = new CSharpCodeProvider(new Dictionary<string, string>() { { "CompilerVersion", "v3.5" } }))
{
var parms = new CompilerParameters(new[] { "mscorlib.dll", "System.Core.dll", "FluentMigrator.dll" });
parms.GenerateExecutable = false;
parms.OutputAssembly = _assemblyPath;
@c1982
c1982 / gist:1626359
Created January 17, 2012 11:39
is exists sql server process in local machine?
public bool SqlServerIsUp()
{
return Process.GetProcessesByName("sqlservr").Any();
}
public void After_1()
{
string Year, Month, Week, Day = String.Empty;
}
public void Before_1()
{
string Year = "";
string Month = "";
string Week = "";
string Day = "";
}
@c1982
c1982 / WhoisCommand.cs
Created December 13, 2011 14:26
PowerShell Whois Module
// Author: Oğuzhan YILMAZ
// Web : www.oguzhan.info
// Email : aspsrc@gmail.com
// 12/13/2011
namespace PoshWhois
{
using System;
using System.Collections.Generic;
using System.IO;
@c1982
c1982 / gist:856761
Created March 5, 2011 22:09
DynamicOverload Pattern
class Program
{
static void Main(string[] args)
{
var cmd = new Executor();
dynamic commandItem = RemoteServer.GetCommandItemFromRemoteServer(); //return Object;
cmd.ExecuteCommand(commandItem);
Console.ReadKey();