Skip to content

Instantly share code, notes, and snippets.

View shana's full-sized avatar
🥽
glub glub

Andreia Gaita shana

🥽
glub glub
View GitHub Profile
[SerializeField] private Vector2 scroll;
[SerializeField] private List<GitLogEntry> entries = new List<GitLogEntry>();
[SerializeField] private int statusAhead;
[SerializeField] private int selectedIndex = -1;
@shana
shana / VSServices.cs
Created January 24, 2018 14:32
getting the stupid version of vs 2017
var devenv = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);
// C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances
var pathToInstallationData = Path.Combine(os.Environment.GetFolderPath(System.Environment.SpecialFolder.CommonApplicationData),
"Microsoft", "VisualStudio", "Packages", "_Instances");
var regexVersion = new Regex(@"""productDisplayVersion"":""([^""]+)""");
var regexPath = new Regex(@"""installationPath"":""([^""]+)""");
foreach (var dir in os.Directory.EnumerateDirectories(pathToInstallationData))
{
var data = os.File.ReadAllText(Path.Combine(dir, "state.json"), System.Text.Encoding.UTF8);
if (regexPath.IsMatch(data) && regexVersion.IsMatch(data))
@shana
shana / .bash_aliases
Created November 2, 2017 19:18
.bash_aliases
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias cd..='cd ..'
alias rd=rmdir
alias md=mkdir
alias dir='ls -lh'
alias la='ls -lah --color'
alias e='subl -w'
export EDITOR="subl -w"
@shana
shana / .bashrc
Created November 2, 2017 19:17
Full .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@shana
shana / .bashrc
Created November 2, 2017 19:15
.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@shana
shana / .profile
Created November 2, 2017 19:12
.profile
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Implementation1
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Implementation1
@shana
shana / .gitconfig
Created October 30, 2016 12:25
Git Configuration
[rerere]
enabled = true
[push]
default = tracking
[branch]
autosetuprebase = always
[apply]
@shana
shana / .gitconfig
Created October 6, 2016 23:19
gitconfig aliases
[alias]
ci = commit
co = checkout
st = status
praise = blame
la = diff --cached --name-only
ls = ls-files -m
da = diff --cached
shown = show --name-status
yank = cherry-pick