Skip to content

Instantly share code, notes, and snippets.

View Snegovikufa's full-sized avatar
📍
Push the red button

Rustam Safin Snegovikufa

📍
Push the red button
View GitHub Profile
@Snegovikufa
Snegovikufa / a.md
Last active January 13, 2017 04:20
Visual Studio Code as external tool for Visual Studio
  1. Create new external tool via Tools - External Tools...
  2. Add new external tool
Settings Value
Title VS Code
Command D:\Soft\VS Code\Code.exe
Arguments -g $(ItemPath):$(CurLine):$(CurCol)
Initial directory $(ItemDir)
@Snegovikufa
Snegovikufa / vs_keys.ahk
Last active September 20, 2016 07:29
AutoHotKey script to jump into navigation bar with current class members
if WinExist("ahk_exe devenv.exe")
^r:: ; Replace Ctrl+R with
send, ^{F2} ; Combination of Ctrl+F2, Tab, Tab
send, {Tab}
send, {Tab}
send, {Down}
return
#IfWinActive
@Snegovikufa
Snegovikufa / post-merge
Created May 6, 2016 11:45
Create changelog when merge to release
#!/bin/sh
if [ `git rev-parse --abbrev-ref HEAD` == "release" ]; then
echo ":: POST MERGE ::"
echo "BRANCH: RELEASE "
date -u > changes.txt
echo "" >> changes.txt
echo "git log --oneline release..master"
@Snegovikufa
Snegovikufa / MultiPagePanel.cs
Created October 15, 2015 11:58
MultiPagePanel for WPF
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Markup;
@Snegovikufa
Snegovikufa / NotifyListWrapper.cs
Last active October 15, 2015 11:49
Wraps List of items to WPF INotifyCollectionChanged interface
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using SharpCommon.Extensions;
namespace SharpCommon.Helpers
{
public class NotifyListWrapper<T> : INotifyCollectionChanged, IList<T>
@Snegovikufa
Snegovikufa / git.sh
Last active August 29, 2015 14:20
Normalize all files line endings in working directory
# Remove all files
$ git rm --cached -r .
# Restore them
$ git reset --hard
# Write both the index and working directory from git's database.
$ git add .
# Prepare to make a commit by staging all the files that will get normalized. This is your chance to inspect which files were never normalized. You should get lots of messages like: "warning: CRLF will be replaced by LF in file."
@Snegovikufa
Snegovikufa / appcast.xml
Last active August 29, 2015 14:20
Appcast template
<?xml version="1.0" encoding="utf-8"?>
<item>
<title>New version 2.13.2 available!</title>
<version>2.13.2</version>
<url>https://github-windows.s3.amazonaws.com/GitHubSetup.exe</url>
<changelog>https://windows.github.com/release-notes.html</changelog>
</item>
@Snegovikufa
Snegovikufa / gismeteo_api.md
Last active November 10, 2016 06:38
Gismeteo Weather API. Doesn't work now.
@Snegovikufa
Snegovikufa / gist:3b2b3c191c087c1a36bd
Created March 25, 2015 14:07
PyCharm/Idea Sublime External Tool
Program: D:\Progs\Sublime Text 3\subl.exe
Parameters: $FilePath$:$SelectionEndLine$:$SelectionStartColumn$
@Snegovikufa
Snegovikufa / run
Last active August 29, 2015 14:15
How to set Omnibus Gitlab sidekiq workers. Edit file /opt/gitlab/sv/sidekiq/run
#!/bin/sh
cd /var/opt/gitlab/gitlab-rails/working
exec 2>&1
exec chpst -e /opt/gitlab/etc/gitlab-rails/env -P \
-U git -u git \
/opt/gitlab/embedded/bin/bundle exec sidekiq \
# ADD THE LINE BELOW AND SET NUMBER OF WORKERS