Skip to content

Instantly share code, notes, and snippets.

View mloskot's full-sized avatar
🏠
Working from home

Mateusz Łoskot mloskot

🏠
Working from home
View GitHub Profile
@bsweger
bsweger / .bash_profile
Created July 6, 2012 19:32
.bash_profile - start ssh-agent
# adopted from https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git#SetupSSHforGit-installpublickey, which was adopted from a GitHub script
if [ -r ~/.profile ]; then . ~/.profile; fi
case "$-" in *i*) if [ -r ~/.bashrc ]; then . ~/.bashrc; fi;; esac
echo
echo "Yo"
echo
SSH_ENV="$HOME/.ssh/environment"
@kra3
kra3 / per user contribution in svn.sh
Created September 24, 2012 12:56
Script to find per user contributions from an Subversion (svn) repository.
$ svn ls -R | egrep -v -e "\/$" | xargs svn blame | awk '{print $2}' | sort | uniq -c | sort -r
$ echo "Now let's bisect the above one liner"
$ svn ls -R # will list all files in svn repo recursively
$ svn ls -R | egrep -v -e "\/$" # get files & directories one line at a time
$ svn ls -R | egrep -v -e "\/$" | xargs svn blame # do a svn blame on each file (print file content with rev & author info)
$ svn ls -R | egrep -v -e "\/$" | xargs svn blame | awk '{print $2}' # get second column which contains svn user name
$ svn ls -R | egrep -v -e "\/$" | xargs svn blame | awk '{print $2}' | sort # sort out put (will be based on svn username)
$ svn ls -R | egrep -v -e "\/$" | xargs svn blame | awk '{print $2}' | sort | uniq -c # get uniq lines with counts (no of lines contributed by user)
$ svn ls -R | egrep -v -e "\/$" | xargs svn blame | awk '{print $2}' | sort | uniq -c | sort -r # sort in reverse order (so user who contributed most comes first)
@silverrain
silverrain / README.rst
Created November 27, 2012 16:01 — forked from dupuy/README.rst
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@joshdick
joshdick / git_prompt.png
Last active February 12, 2024 04:16
My Git prompt for zsh.
git_prompt.png
@roxlu
roxlu / install_arch_linux.org
Created March 5, 2013 22:42
Install arch-linux - work in progress gui

Installing ARCH linux

Preparation:

  • Get an empty USB disk
  • Create 2 partitions:
    • ARCH - filesystem FAT
    • FAT - filesystem FAT
  • Downlaod Arch linux from: www.archlinux.org/download and put on your USB ARCH partition
  • Make sure you have an Ubuntu install somewhere (VMware would work)

Fix the iso to be usable for UEFI:

@bravnsgaard
bravnsgaard / gist:5595699
Created May 16, 2013 22:46
sscanf warnings in soci_sqlite3 backend.
From bcdcd43667348fe64154e4067199a6745b73d0b3 Mon Sep 17 00:00:00 2001
From: Brian Ravnsgaard Riis <[email protected]>
Date: Fri, 17 May 2013 00:38:23 +0200
Subject: [PATCH] Fixed some sscanf bugs in the SQLite backend.
---
vendor/soci/backends/sqlite3/common.h | 8 ++++++++
vendor/soci/backends/sqlite3/standard-use-type.cpp | 8 ++++++++
vendor/soci/backends/sqlite3/vector-use-type.cpp | 8 ++++++++
3 files changed, 24 insertions(+)
@willurd
willurd / web-servers.md
Last active March 4, 2026 23:24
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
@mloskot
mloskot / lectures_watching_tracklog.md
Last active November 3, 2020 09:17
Watched Lectures Log (programming, mathematics, algorithms, databases, etc.)
git diff --no-prefix --ignore-space-at-eol | sed -e "s/^diff --git [^[:space:]]*/Index:/" -e "s/^index.*/===================================================================/" > changes.patch