Skip to content

Instantly share code, notes, and snippets.

Avatar

Sándor Czettner czettnersandor

  • Glasgow, United Kingdom
View GitHub Profile
View Magento 2 gitignore
/.buildpath
/.cache
/.metadata
/.project
/.settings
atlassian*
/nbproject
/sitemap
/sitemap.xml
/.idea
@czettnersandor
czettnersandor / i3-cheat-sheet.md
Last active May 4, 2017 — forked from JeffPaine/i3-cheat-sheet.md
i3 Window Manager Cheat Sheet
View i3-cheat-sheet.md

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (Super - Win)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open rofi (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
View zoneminder log error
Unable to decode JSON string 'array (
'result' => 'Ok',
'updated' => 'Fri 25th Mar, 2:13pm',
'total' => '36639',
'available' => '36639',
'logs' =>
array (
0 =>
array (
'TimeKey' => '1458915186.171727',
@czettnersandor
czettnersandor / vimbingo
Last active Dec 29, 2015 — forked from matason/vimbingo
Adding myself in
View vimbingo
your name
Sandor Czettner
@czettnersandor
czettnersandor / getErrorMessages.php
Last active Dec 10, 2015 — forked from umpirsky/getErrorMessages.php
Symfony 2: Retrieves every error message for the form to a simple array. Including the field error messages.
View getErrorMessages.php
<?php
private function getErrorMessages(\Symfony\Component\Form\Form $form) {
$errors = array();
foreach ($form->getErrors() as $key => $error) {
$errors[] = $error->getMessage();
}
if ($form->hasChildren()) {
foreach ($form->getChildren() as $child) {
if (!$child->isValid()) {
@czettnersandor
czettnersandor / Rakefile
Created Mar 14, 2012
Simple git deployment over ssh with sudo with rake
View Rakefile
require 'net/ssh'
namespace :deploy do
@host = '111.111.111.111'
@username = 'user'
@port = 2222
@password = ''
@destination = ''
View .vimrc
if has("gui_running")
set background=dark
colorscheme solarized
set guioptions+=b
set lines=53 " height = 50 lines
set columns=130 " width = 100 columns
set ls=2 " always show status
set scrolloff=3 " keep 3 lines when scrolling
set ignorecase " when searching
set nobackup " disable backup file (.filename.swp)
@czettnersandor
czettnersandor / devise.hu.yml
Created Nov 26, 2010
Hungarian translation for Devise
View devise.hu.yml
# Additional translations at http://github.com/plataformatec/devise/wiki/I18n
hu:
errors:
messages:
expired: "lejárt, igényelj egy újat"
not_found: "nem található"
already_confirmed: "már meg van erősítve"
not_locked: "nincs zárolva"
not_saved:
You can’t perform that action at this time.