Skip to content

Instantly share code, notes, and snippets.

View sergejusb's full-sized avatar

Sergejus sergejusb

  • Google
  • Seattle, WA, USA
View GitHub Profile
@sergejusb
sergejusb / share_internet.bat
Created January 16, 2014 21:12
share internet as wi-fi spot
@echo off
set key=%1
set ssid=%2
if (%key%) == () set key=1234567890
if (%ssid%) == () set ssid=shared
echo Usage: share_internet.bat [network password] [network name]
echo Using: share_internet.bat %key% %ssid%
@sergejusb
sergejusb / Sql-Functions.ps1
Last active December 16, 2015 03:38
Basic Power-Shell cmdlets to work with SQL Server (via sqlcmd.exe)
# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# SQL Server functions
function Execute-Sql($sql, $username, $password, $file) {
Write-Host -ForegroundColor Cyan "Executing $file on $sql with user $username"
& sqlcmd -S $sql -U $username -P $password -i $file
}
function Execute-SqlDir($sql, $username, $password, $dir) {
Get-ChildItem $dir | Select-Object FullName | foreach {
@sergejusb
sergejusb / IIS-Functions.ps1
Last active February 9, 2018 11:46
Basic Power-Shell cmdlets to work with IIS 7+
# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# IIS functions
Import-Module WebAdministration
function Test-WebAppPool($Name) {
return Test-Path "IIS:\AppPools\$Name"
}
function Get-WebAppPool($Name) {
namespace BeBetterDeveloper.Algorithms.Math
{
using System;
using NUnit.Framework;
public static class Power
{
public static double Pow(double number, int exp)
{
@sergejusb
sergejusb / ilmerge
Last active December 14, 2015 08:09 — forked from crmckenzie/gist:4004375
PowerShell script used for IL Merging. Useful with CI servers like TeamCity
<#
.SYNOPSIS
IlMerges an assembly with its dependencies. Depends on nuget being installed in the PATH.
.PARAMETER targetProject
The name of the project to be ilmerged
.PARAMETER outputAssembly
The name of the ilmerged assembly when it is created
@sergejusb
sergejusb / .gitignore
Created January 16, 2012 22:27
.gitignore for .NET
#ignore thumbnails created by windows
Thumbs.db
#Ignore files build by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
@sergejusb
sergejusb / console.xml
Created November 10, 2011 19:08
Console2 Settings File
<?xml version="1.0"?>
<settings>
<console change_refresh="10" refresh="100" rows="25" columns="80" buffer_rows="500" buffer_columns="0" shell="" init_dir="" start_hidden="0" save_size="0">
<colors>
<color id="0" r="0" g="0" b="0"/>
<color id="1" r="0" g="0" b="128"/>
<color id="2" r="0" g="150" b="0"/>
<color id="3" r="0" g="150" b="150"/>
<color id="4" r="170" g="25" b="25"/>
<color id="5" r="128" g="0" b="128"/>
@sergejusb
sergejusb / Features.md
Created November 1, 2011 13:21
DotNetGroup.lt

DotNetGroup.lt feature roadmap

v0.1

  • aggregation of #ltnet tweets
  • aggregation of rss from the manually added url list
  • feedback button for suggestions and bug report
  • initial site design, ready for more features