Skip to content

Instantly share code, notes, and snippets.

View Kaylebor's full-sized avatar

Ender Kaylebor

View GitHub Profile
@Kaylebor
Kaylebor / init.vim
Last active June 25, 2020 21:26
My Neovim configuration file
" Save as $HOME/.config/nvim/init.vim
" Dependencies
" vim-plug: https://github.com/junegunn/vim-plug
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.local/share/nvim/plugged')
@Kaylebor
Kaylebor / arrayFunctions.js
Last active March 31, 2017 15:27
Processing of arrays of strings
/* Checks if a string is contained inside the given array of strings
* If the second variable is a string, it just compares them
* If the second variable is neither string or array, it returns false */
function checkIfStringInArray(str, arr) {
if (typeof arr === 'string')
return str === arr;
if (arr.constructor && arr.constructor === Array)
for (var i in arr) {
if (str === arr[i]) {
return true;
@Kaylebor
Kaylebor / my-regexes.txt
Created February 23, 2017 08:09
List of difficult regexes I've used. Over time, entries might become more complicated.
/(?!-,)(?!^,)(^-?\d*,?\d{0,2}$)/ //Number, positive or negative, with up to two decimals
@Kaylebor
Kaylebor / project-import-scan.py
Last active April 4, 2018 07:49
project-import-scan.py
#!/usr/bin/env python
import csv
import re
import os
topdir=r'folderToScan'
output=r'outputFile.csv'
exten='.extension'
def parsesource(firstfolder,filepath,filename,sourcefile):