Skip to content

Instantly share code, notes, and snippets.

View v3rt1go's full-sized avatar

Alex Griciuc v3rt1go

  • Bucharest, Romania
View GitHub Profile
@v3rt1go
v3rt1go / .gitignore
Last active October 15, 2018 19:33
.gitignore for .net projects
_build/
_site/
Properties/
# Use git add -f to force override .sln when required. Not needed in most cases.
# git add -f myProj.sln
*.sln
Project_Readme.html
@v3rt1go
v3rt1go / App.config
Created June 30, 2016 08:47 — forked from TimMurphy/App.config
.NET solution
<configSections>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
</configSections>
<nlog throwExceptions="false" xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<time type="AccurateUTC" />
<targets>
<target xsi:type="Chainsaw" name="Chainsaw" address="udp://127.0.0.1:7071" />
<target xsi:type="Trace" name="Trace" layout="NLog | ${level:padding=5} | ${logger} | ${message}" />
</targets>
<configSections>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
<sectionGroup name="common">
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
</sectionGroup>
</configSections>
<common>
<logging>
<factoryAdapter type="Common.Logging.NLog.NLogLoggerFactoryAdapter, Common.Logging.NLog31">
@v3rt1go
v3rt1go / fedora-install-nodejs.sh
Created November 18, 2015 01:10 — forked from trajakovic/fedora-install-nodejs.sh
Install node.js on fedora (23+).(v5.0.0)
#!/usr/bin/env bash
func_check_for_root() {
if [ ! $( id -u ) -eq 0 ]; then
echo "ERROR: $0 Must be run as root, Script terminating" ;exit 7
fi
}
func_check_for_root
#SETUP PARAMS
// Using closures for performance gains
// 1. This is bad because we assign names on the global scope
// and it might impact with other vars with same name in global
var names = ['zero', 'one', 'two', 'three', 'four', 'five'];
var digit_names = function(n) {
return names[n]
};
console.log(digit_names(1));
// function form
function fnForm() {
console.log('function form: ', this);
}
fnForm(); // function form - this is the global object - (window)
// method form
var parent = function parent() {
var p = {};
if executable('ag')
" Use Ag over Grep
autocmd VimEnter * set grepprg=ag\ --nogroup\ --nocolor
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
unlet g:ctrlp_user_command
let g:ctrlp_user_command = 'ag %s -l --nocolor --hidden -g ""'
" ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
var catchAllRoute = branch('!posts/*.html');
catchAllRoute.use(permalinks({
relative: false
}));
@v3rt1go
v3rt1go / 0_reuse_code.js
Created September 24, 2015 11:27
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console