Skip to content

Instantly share code, notes, and snippets.

View akemrir's full-sized avatar

Karol Jakusz-Gostomski akemrir

View GitHub Profile
@akemrir
akemrir / fzf-lua-tags.lua
Last active November 14, 2023 18:28
Extend fzf-lua with tags with custom command
local function getPath(str)
return str:match("(.*[/\\])")
end
local function cutTagBasePath(tags, str)
for _, v in pairs(tags) do
print(v)
str = str:gsub(getPath(v), "")
end
@akemrir
akemrir / starship.toml
Last active November 16, 2022 19:41
newest addition
format = """
$username\
$hostname\
$directory\
$git_branch\
$git_state\
$git_status\
$cmd_duration\
$python\
$ruby\
" # VIMRC minisnip sample #
if &compatible
set nocompatible
endif
filetype plugin indent on
syntax enable
let mapleader = "\<Space>"
if &shell =~# 'fish$'
@akemrir
akemrir / .vimrc
Created June 8, 2020 16:21 — forked from jackkinsella/.vimrc
.vimrc
" Location for installing plugins
call plug#begin('~/.vim/plugged')
" Other plugins are specified with user/repo on Github or x.vim on vimscripts
" Git integration (status bar and commands like Gblame)
Plug 'tpope/vim-fugitive'
" Add info to sidebar about git
Plug 'airblade/vim-gitgutter'
" Add file-management commands like :Delete, :Move, and :Rename
Plug 'tpope/vim-eunuch'
@akemrir
akemrir / web-servers.md
Created May 27, 2020 05:46 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@akemrir
akemrir / fix-infinality.md
Created November 15, 2019 16:08 — forked from cryzed/fix-infinality.md
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@akemrir
akemrir / tableToSql.js
Created December 11, 2018 13:43 — forked from rnaffer/tableToSql.js
Export table to excel with pure javascript
var tableToExcel = (function() {
var uri = 'data:application/vnd.ms-excel;base64,'
, template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><?xml version="1.0" encoding="UTF-8" standalone="yes"?><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>'
, base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) }
, format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) };
return function(table, name) {
if (!table.nodeType) table = document.getElementById(table);
var ctx = { worksheet: name || 'Worksheet', table: table.innerHTML };
window.location.href = uri + base64(format(template, ctx));
};
@import "bootstrap/variables"
=respond-to($media)
@if $media == xs
@media (max-width: $screen-xs-max)
@content
@else if $media == sm
@media (min-width: $screen-sm-min) and (max-width: $screen-sm-max)
@content
@else if $media == md
#!/bin/bash
for key in FFF979E7 CDFD6BB0 4C7EA887 6AC6A4C2 824B18E8; do
pacman-key --recv-keys $key
pacman-key --lsign-key $key
printf 'trust\n3\nquit\n' | gpg --homedir /etc/pacman.d/gnupg/ \
--no-permission-warning --command-fd 0 --edit-key $key
done
$width: 960px
$numCols: 12
$gutterWidth: 10px
$colWidth: ($width/$numCols) - (2*$gutterWidth)
.container_#{$numCols}
margin-left: auto
margin-right: auto
width: $numCols * ($colWidth+(2*$gutterWidth))