test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json; | |
namespace TestApp | |
{ | |
internal class Stuff | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Vundle | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
"Plugin 'Valloric/YouCompleteMe' | |
"Plugin 'Valloric/iCompleteMe' | |
Plugin 'scrooloose/nerdtree' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class LinqExtensions | |
{ | |
public static IQueryable<T> QueryIfElse<T>(this IQueryable<T> query, | |
Func<bool> predicate, | |
Func<IQueryable<T>, IQueryable<T>> @if, | |
Func<IQueryable<T>, IQueryable<T>> @else) => | |
predicate() ? @if(query) : @else(query); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static async Task TruncateTable<T>(this CersPg context) where T : class | |
{ | |
var tableAttr = (TableAttribute)Attribute.GetCustomAttribute(typeof(T), typeof(TableAttribute)); | |
var sql = $"TRUNCATE {tableAttr.Name} RESTART IDENTITY CASCADE"; | |
await context.Database.ExecuteSqlRawAsync(sql); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Call onefetch if we navigate to a new repository | |
LAST_REPO="" | |
cd() { | |
builtin cd "$@"; | |
git rev-parse 2>/dev/null; | |
if [ $? -eq 0 ]; then | |
if [ "$LAST_REPO" != $(basename $(git rev-parse --show-toplevel)) ]; then | |
onefetch | |
LAST_REPO=$(basename $(git rev-parse --show-toplevel)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function wrap_golang_multi_return() | |
-- If its not a go buffer dont bother doing any more work | |
if vim.bo.filetype ~= "go" then | |
return | |
end | |
local cursor_pos = vim.api.nvim_win_get_cursor(0) | |
local line_num, line_col = cursor_pos[1], cursor_pos[2] | |
local curr_buf = vim.api.nvim_get_current_buf() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function wrap_golang_return() | |
if vim.bo.filetype ~= "go" then | |
return | |
end | |
local query_str = [[ | |
(_ | |
result: (_) @result | |
(ERROR)? @error | |
) |