Skip to content

Instantly share code, notes, and snippets.

View shytikov's full-sized avatar
🎯
Focusing

Oleksii Shytikov shytikov

🎯
Focusing
View GitHub Profile
@shytikov
shytikov / basic.html
Last active August 1, 2016 07:26
A Basic HTML5 Template For Any Project
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>A Basic HTML5 Template For Any Project</title>
<meta name="description" content="A Basic HTML5 Template For Any Project">
<meta name="author" content="SitePoint">
@shytikov
shytikov / commit-msg
Created July 17, 2012 21:07
commit-msg hook script
#!/bin/sh
#
# Automatically adds branch name and branch description to every commit message.
#
NAME=$(git branch | grep '*' | sed 's/* //')
DESCRIPTION=$(git config branch."$NAME".description)
TEXT=$(cat "$1" | sed '/^#.*/d')
if [ -n "$TEXT" ]
then
@shytikov
shytikov / .gitconfig
Last active May 5, 2017 12:09
.gitconfig config file
[user]
name =
email =
[log]
decorate = short
[color]
ui = auto
status = auto
diff = auto
[alias]
@shytikov
shytikov / .gitignore
Created November 30, 2011 16:19
Default .gitignore file for C# projects
#ignore thumbnails created by windows
Thumbs.db
#Ignore files build by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
@shytikov
shytikov / gist:1391331
Created November 24, 2011 13:20
Draft implementation of viewing file history for libgit2sharp
List<Commit> modificationCommits = new List<Commit>();
string currentSha = startingItemSha;
string currentPath = startingItemPath;
Commit temp = null;
foreach (Commit c in repository.Commits)
{
if (c.Tree.Any<TreeEntry>(entry => entry.Name == currentPath))
{
@shytikov
shytikov / .vimrc
Last active November 23, 2018 09:00
.vimrc config file
set nocompatible
set ruler
set showcmd
set nu
set showmode
set nowrap
set guioptions-=T
set guioptions-=r
set guioptions-=L
@shytikov
shytikov / gist:1367041
Created November 15, 2011 13:08
Simplest C# Singleton
// .NET Singleton
sealed class Singleton
{
private Singleton() {}
public static readonly Singleton Instance = new Singleton();
}