Skip to content

Instantly share code, notes, and snippets.

View MattSkala's full-sized avatar

Matouš Skála MattSkala

View GitHub Profile
# Node
npm-debug.log
# Mac
.DS_Store
# Windows
Thumbs.db
# WebStorm
[user]
name = Matouš Skála
email = skala.matous@gmail.com
[alias]
st = status
hist = log --pretty=format:\"%C(yellow)%h %Cred%ad%Cgreen%d %Creset%s %Cblue[%an]\" --graph --date=short --date=relative
[color]
ui = auto
[color "branch"]
current = yellow reverse

Keybase proof

I hereby claim:

  • I am mattskala on github.
  • I am mattskala (https://keybase.io/mattskala) on keybase.
  • I have a public key ASD_nIrB4tCMgLuTL10w7b6VCMW-Tk5AMwavDkHwyzJjDQo

To claim this, I am signing this object:

@MattSkala
MattSkala / lengthsum.sh
Last active August 29, 2015 14:23
Count total length of videos in current dir
#!/bin/sh
if [ -z "$1" ]; then
echo "Missing argument: dir"
exit
fi
if [ -z "$2" ]; then
echo "Missing argument: format"
exit
@MattSkala
MattSkala / .gitconfig
Created October 18, 2014 10:36
.gitconfig
[user]
name = Matouš Skála
email = skala.matous@gmail.com
[core]
# windows->true, linux->input
autocrlf = input
safecrlf = false
excludesfile = /Users/skala/.gitignore_global
[alias]
co = checkout
@MattSkala
MattSkala / gitolite.sh
Last active December 19, 2015 18:39
Installing gitolite on Linux server
apt-get install gitolite
adduser \
--system \
--shell /bin/bash \
--gecos 'git version control' \
--group \
--disabled-password \
--home /home/git \
git
su git
@MattSkala
MattSkala / linkify_helper.php
Created March 21, 2013 08:22
Linkify helper for Nette. It converts all links in text ito clickable <a> elements.
<?php
$this->template->registerHelper('linkify', function($text) {
return preg_replace('"\b(http(s)?://\S+)"', '<a href="$1">$1</a>', $text);
});
?>
@MattSkala
MattSkala / gist:3570789
Created September 1, 2012 11:44
What is expected output?
/*
table foo
id int(11) AUTO INCREMENT
name varchar(255)
*/
$item = array();
$item['id'] = null;
$item['name'] = "Lorem ipsum";