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
| " File: definition.vim | |
| " Author: romgrk | |
| " Date: 13 May 2016 | |
| " Description: Jump where the given expression was last set. | |
| " !::exe [so %] | |
| command! -nargs=* -complete=expression Goto call <SID>goto(<q-args>) | |
| " Example mappings: | |
| " nmap <leader>gc :Goto command<space> |
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
| " Gothik functions "{{{ | |
| function! Gothik (string) | |
| let result = '' | |
| let len = len(a:string) | |
| let n = 0 | |
| while (n < len) | |
| let result .= s:gothik(a:string[n]) | |
| let n += 1 | |
| endwhile |
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
| #!/bin/zsh | |
| # Usage: $ savepull [dir] | |
| # | |
| # Default: | |
| # dir = ./ | |
| # | |
| # Updates the master branch of the specified git repository | |
| # from upstream (aka origin/master), but handles dirty directory | |
| # by stashing the state, switching to master, then coming back to | |
| # the initial branch & pop-stashing automatically. |
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
| " cs'' => will switch surrounding simple/double quotes | |
| " cs'[x] => will delegate to vim-surround | |
| nmap <expr>cs' CSurroundQuotes() | |
| fu! CSurroundQuotes() | |
| let qch = s:findQuote() | |
| let char = s:getChar('Question', 'Exchange quotes with?') | |
| if char == "'" | |
| let char = (qch ==# "\"" ? "'" : "\"") | end |
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
| GNU gdb (GDB) 7.11.1 | |
| Copyright (C) 2016 Free Software Foundation, Inc. | |
| License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
| This is free software: you are free to change and redistribute it. | |
| There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
| and "show warranty" for details. | |
| This GDB was configured as "x86_64-pc-linux-gnu". | |
| Type "show configuration" for configuration details. | |
| For bug reporting instructions, please see: | |
| <http://www.gnu.org/software/gdb/bugs/>. |
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
| /// <reference path="../typings/tsd.d.ts" /> | |
| import * as _ from 'lodash'; | |
| import {GtkWindow, NtkWindow} from './view'; | |
| import GI = require('node-gtk'); | |
| // GI imports | |
| const Gdk: any = GI.require('Gdk', '3.0'); | |
| const Gtk: any = GI.require('Gtk', '3.0'); |
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
| // Pops up a popup to take a picture in the browser using the webcam. (Vanilla JS) | |
| // Returns a promise which resolves to a data URI ('image/jpeg;base64,...') | |
| // Tested with chrome 54.x | |
| // | |
| // Example: | |
| // capturePhoto().then(data => document.querySelector('img').src = data) | |
| // | |
| // MIT license. Romgrk, 2016. | |
| const capturePhoto = () => { |
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 zsh | |
| # Usage: autostart [title] [command] | |
| # | |
| echo "[Desktop Entry] | |
| Name=$1 | |
| Terminal=false | |
| Type=Application | |
| Exec=$2" >> ~/.config/autostart/$1.desktop |
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
| import { | |
| inspect, | |
| createToken, Token} from '../common'; | |
| let stringConcat = (prev: string, cur: string) => prev.concat(cur) | |
| function tokensToString (tokens: Token[]) { | |
| return tokens.map(t => t.text) | |
| .reduce(stringConcat, ''); | |
| } |
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
| import _ from 'lodash'; | |
| import { | |
| Position, Location, Size, | |
| Token, createToken, attributesFromStore, | |
| minMax, inspect, getFontSize, } from '../common'; | |
| import { | |
| create, addClass, removeClass, toggleClass, clearNode, | |
| } from '../dom'; | |
| import TextRegion from '../dom/region'; |