Skip to content

Instantly share code, notes, and snippets.

View kkoziarski's full-sized avatar

Krzysztof Koziarski kkoziarski

View GitHub Profile
@kkoziarski
kkoziarski / doublecmd-monokai-extended-filemask.xml
Last active January 19, 2017 20:27
Monokai theme for Double Commander. Edit C:\Users\USER\AppData\Roaming\doublecmd\doublecmd.xml and replace <Colors> section
<!--REPLACE <Colors> and <SearchTemplates> -->
<Colors>
<UseCursorBorder>False</UseCursorBorder>
<CursorBorderColor>-2147483635</CursorBorderColor>
<UseFrameCursor>True</UseFrameCursor>
<Foreground>305780</Foreground>
<Background>2238503</Background>
<Background2>2238503</Background2>
<Cursor>16089859</Cursor>
@kkoziarski
kkoziarski / find_table_by_column.sql
Created January 18, 2017 07:46
Find all tables containing column with specified name
SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME like '%Brand%'
ORDER BY TABLE_NAME, COLUMN_NAME
// single line comments use a double slash
(* multi line comments use pair
-end of multi line comment- *)
// ======== "Variables" (but not really) ==========
// The "let" keyword defines an (immutable) value
let myInt = 5
let myFloat = 3.14
let myString = "hello" //note that no types needed
@kkoziarski
kkoziarski / CPPXmasTree.cpp
Last active December 28, 2016 19:30
XmasTree C++
// CPPXmasTree.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <ostream>
#include <string>
#include "XmasTree.h"
inline void printHelloWorld();
@kkoziarski
kkoziarski / XmasTree.cs
Last active December 28, 2016 19:30
XmasTree C#
using System;
namespace XmasTree
{
class Program
{
static void Main(string[] args)
{
Console.Write("Enter odd number (tree's bottom length): ");
int length = int.Parse(Console.ReadLine()); //9
@kkoziarski
kkoziarski / project.xproj
Created August 12, 2016 08:26
Stop VisualStudio compile TypeScript on build
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
</PropertyGroup>
@kkoziarski
kkoziarski / Readme.md
Last active August 12, 2016 06:30
StyleCop - ignore global rules in solutions. Place it in .sln location

To turn off StyleCop at solution level:

  • Create(or copy an existing) a setting file 'Settings.StyleCop' in the root directory containing the *.sln file.
  • Add the below xml and save
<StyleCopSettings Version="105">
  <GlobalSettings>
    <BooleanProperty Name="RulesEnabledByDefault">False</BooleanProperty>
  </GlobalSettings>
@kkoziarski
kkoziarski / MoveFilesToSingleDirectory.ps1
Last active August 3, 2016 05:47
Moves all files in given directory and subdirectories to single director
param (
[string]$Path = $PSScriptRoot,
[string[]] $Filter = @("*.mp4","*.mkv", "*.avi"),
[string]$DestDir = $null
)
Clear-Host
function MoveFilesToSingleDirectory{
@kkoziarski
kkoziarski / npm-global-packages.md
Last active February 22, 2017 19:46
Listing globally installed NPM packages
npm list -g --depth=0
+-- angular-cli@1.0.0-beta.22-1
+-- bower@1.8.0
+-- generator-aspnet@0.2.5
+-- generator-code@1.1.5
+-- grunt-cli@1.2.0
@kkoziarski
kkoziarski / .git-commands.md
Last active January 29, 2021 09:45 — forked from hofmannsven/README.md
Git Cheatsheet