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
var names = document.body.getElementsByClassName('gameListRowItemName'); | |
var namesString = ''; | |
for (var i = 0; i < names.length; i++) namesString += (names[i].innerText + '\n'); |
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
function! InsertFoldMarker(...) abort | |
let l:cur_line = getline('.') | |
let l:markers = split(&l:fmr, ',') | |
let l:marker = (a:0) && len(l:markers)>1 ? l:markers[1] : l:markers[0] | |
let l:level = foldlevel('.') | |
let l:level = l:level == 0 ? '1' : l:level | |
let l:cms = split(&l:cms, '%s') | |
" TODO: handle paired comment markers | |
let l:cms = (a:0) && len(l:cms)>1 ? l:cms[1] : l:cms[0] | |
let l:marker_cnt = count(l:cur_line, l:cms) |
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
" quick add plugins for a plugin manager to load {{{1 | |
function! AddPacFromCb() abort | |
if v:version >= 801 || (v:version == 800 && has("patch1630")) | |
let l:cb = trim(@+) | |
else | |
" do oldschool way to trim all spaces and whatnot | |
let l:cb = substitute(@+,'\v^\s*(.{-})\s*\n$','\1','') | |
endif | |
let l:cb = substitute(l:cb, '\v^https://github.com/','','') | |
put = 'Plugin ''' . l:cb . '''' |
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
" screen line scroll - very useful with wrap on | |
" https://bluz71.github.io/2017/05/15/vim-tips-tricks.html | |
nnoremap <expr> j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj' | |
nnoremap <expr> k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk' |
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
#!/usr/bin/env python3.6 | |
# -*- coding: utf-8 -*- | |
# dror - pathlib edition | |
# Based on https://gist.github.com/dansku/9040240#file-dropboxorganize-py | |
__lastchanged__ = '2018-06-07 06:07' | |
__verstion__ = '0.6.2' | |
from datetime import date | |
from pathlib import Path | |
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
" Auto-insert closing parenthesis/brace {{{2 | |
" TODO: make bracket insertion a little smarter | |
" right now it gets in the way more than it helps | |
inoremap ( ()<Left> | |
inoremap { {}<Left> | |
inoremap [ []<Left> | |
" Auto-delete closing parenthesis/brace | |
function! BetterBackSpace() abort | |
let cur_line = getline('.') |
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
@echo off | |
if exist "%USERPROFILE%\vimfiles" ( if not exist "%USERPROFILE%\vimfiles_" (move "%USERPROFILE%\vimfiles" "%USERPROFILE%\vimfiles_") else (echo "0 -> _ failed, _ exists")) | |
if exist "%USERPROFILE%\vimfiles1" ( if not exist "%USERPROFILE%\vimfiles" (move "%USERPROFILE%\vimfiles1" "%USERPROFILE%\vimfiles") else (echo "1 -> 0 failed, 0 exists")) | |
if exist "%USERPROFILE%\vimfiles_" ( if not exist "%USERPROFILE%\vimfiles1" (move "%USERPROFILE%\vimfiles_" "%USERPROFILE%\vimfiles1") else (echo "_ -> 1 failed, 1 exists")) |
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
nnoremap <expr> <leader><Tab> getline('.') =~ "\"" ? "m1A {{{1<Esc>`1" : "m1A \" {{{1<Esc>`1" | |
nnoremap <expr> <leader>1<Tab> getline('.') =~ "\"" ? "m2A }}}1<Esc>`2" : "m1A \" }}}1<Esc>`2" | |
inoremap <expr> <localleader><Tab> getline('.') =~ "\"" ? "<Esc>m1A {{{1<C-o>`1" : "<Esc>m1A\" {{{1<C-o>`1" | |
inoremap <expr> <localleader>1<Tab> getline('.') =~ "\"" ? "<Esc>m2A }}}1<C-o>`2" : "<Esc>m2A\" }}}1<C-o>`2" |
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
#!/usr/bin/env python3 | |
'''Findmedia - generate a (play)list of specified filetypes''' | |
import os | |
__revision__ = '8' | |
vidia = ('3gp', 'AVI', 'VOB', 'WMV', 'wmv', 'avi', 'flv', 'mka', 'mkv', | |
'mov', 'mp4', 'mpeg', 'mpg', 'vob', 'ogm') | |
newformats = ('webm') |
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
@echo off | |
if exist "*.jpg" (md ".\jpg\") && (move *.jpg ".\jpg\") && (move *.jpeg ".\jpg\") ELSE (echo no jpg) | |
if exist "*.tga" (md ".\tga\") && (move *.tga ".\tga\") ELSE (echo no tga) | |
if exist "*.bmp" (md ".\bmp\") && (move *.bmp ".\bmp\") ELSE (echo no bmp) | |
if exist "*.gif" (md ".\gif\") && (move *.gif ".\gif\") ELSE (echo no gif) | |
if exist "*.psd" (md ".\psd\") && (move *.psd ".\psd\") ELSE (echo no psd) | |
if exist "*.png" (md ".\png\") && (move *.png ".\png\") ELSE (echo no png) |