Skip to content

Instantly share code, notes, and snippets.

View JanSuchanek's full-sized avatar

Jan Suchánek JanSuchanek

View GitHub Profile
@emmanuel
emmanuel / file.sql
Created June 2, 2011 07:54
Closure Table operations SQL fragments
-- Retrieve descendants
-- ====================
-- retrieve descendants of #4
SELECT c.*
FROM Comments AS c
JOIN TreePaths AS t ON c.comment_id = t.descendant
WHERE t.ancestor = 4;
-- Retrieve ancestors
@sgergely
sgergely / gist:3793166
Created September 27, 2012 09:43
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
<?php
/**
* This file is part of the Kdyby (http://www.kdyby.org)
*
* Copyright (c) 2008, 2012 Filip Procházka (filip@prochazka.su)
*
* For the full copyright and license information, please view the file license.txt that was distributed with this source code.
*/
@Tharos
Tharos / Mapper.php
Last active December 21, 2015 06:39
Translations in Lean Mapper. See http://www.leanmapper.com/samples/translations.zip for working example.
<?php
namespace Model;
class Mapper extends \LeanMapper\DefaultMapper implements ITranslatingMapper
{
/**
* @return string
*/
@MichalKalita
MichalKalita / Soupis webů s Nette Framework
Last active November 4, 2018 19:31
Update 29.4.2016: zkontrolováno cca 200 000 stránek, podle hlavičky "X-Powered-By"
http://www.100reklam.cz
http://10hvezd.cz
http://12plus12.cz
http://www.17november1989.sk
http://1bazar.sk
http://www.1cfc.cz
http://1cornhill.com
http://1site.cz
http://www.1weby.cz
http://24keys.cz
@entropiae
entropiae / fix_git_sslread_9806.sh
Last active February 3, 2022 23:32
git: how to solve "SSLRead() return error -9806" in OSX using brew
$ brew remove git
$ brew remove curl
$ brew install openssl
$ brew install --with-openssl curl
$ brew install --with-brewed-curl --with-brewed-openssl git