Skip to content

Instantly share code, notes, and snippets.

View marekkowalczyk's full-sized avatar

Marek Kowalczyk marekkowalczyk

View GitHub Profile
@vangberg
vangberg / DWM-ON-OS-X.md
Created February 22, 2010 19:24
dwm on os x [work in progress!]

Installing and configuring dwm on OS X

  1. Install XQuartz (http://xquartz.macosforge.org) which is the development version of the X11.app that ships with OS X, which means it is way more up to date. I have had some weird issues with X11.app v. 2.3-something. XQuartz 2.5.0 fixed that.

  2. Install dwm from Homebrew, brew install dwm. This makes a bunch of necessary tweaks to the DWM configuration.

  3. Add the following script to $PATH, name it dwm-launch and chmod 755:

    cd ~
    

while true

@defunkt
defunkt / installing-Mustache.tmbundle.md
Created March 6, 2010 10:27
Installing Mustache.tmbundle
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@odwrotnie
odwrotnie / currency-words-pl.scala
Created January 28, 2012 14:26
Słownie kwota w złotych
case class Currency(name: String, short: String, p: String, left: Boolean = false) {
def digits(value: Double) = append("%.2f" format value, short)
def words(value: Double) = {
val before = w(value.toLong)
val after = w(((value * 100.0f) % 100).toLong)
List(before, after).filterNot(_.isEmpty).zip(List(short, p)).
map(t => List(t._1, t._2)).flatten.mkString(" ").trim
}
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@mattratleph
mattratleph / vimdiff.md
Last active July 18, 2024 15:03 — forked from roothybrid7/vimdiff_cheet.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@guifromrio
guifromrio / compress-pdf-with-gs.md
Created August 30, 2013 14:39
Compress PDF files with ghostscript

This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.

ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Other options for PDFSETTINGS:

  • /screen selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting.
  • /ebook selects medium-resolution output similar to the Acrobat Distiller "eBook" setting.
  • /printer selects output similar to the Acrobat Distiller "Print Optimized" setting.
  • /prepress selects output similar to Acrobat Distiller "Prepress Optimized" setting.
@kristopherjohnson
kristopherjohnson / Makefile
Last active March 14, 2024 20:42
Makefile that uses Pandoc to generate HTML, PDF, DOCX, etc. from Markdown source files
# Makefile
#
# Converts Markdown to other formats (HTML, PDF, DOCX, RTF, ODT, EPUB) using Pandoc
# <http://johnmacfarlane.net/pandoc/>
#
# Run "make" (or "make all") to convert to all other formats
#
# Run "make clean" to delete converted files
# Convert all files in this directory that have a .md suffix
@jiaxu825
jiaxu825 / pandocHeader
Last active March 14, 2024 20:42
A Pandoc YAML metadata block for compilling Markdown to pretty PDF via latex
---
title:
author:
date:
documentclass:
- scrartcl
header-includes:
- \usepackage{paralist}
- \usepackage{booktabs}
- \usepackage{numprint, xspace, paralist}
@baig
baig / csv2table.hs
Last active November 27, 2023 14:27
A Pandoc filter that replaces Image links having *.csv extension with Pandoc Markdown Tables.
#!/usr/bin/env runhaskell
{-
The MIT License (MIT)
Copyright (c) 2015 Wasif Hasan Baig <pr.wasif@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights