Skip to content

Instantly share code, notes, and snippets.

@achtan
achtan / .ideavimrc
Created December 6, 2023 16:29
My .ideavimrc
"" Source your .vimrc
"source ~/.vimrc
let mapleader = " "
set easymotion
set NERDTree
let g:NERDTreeMapActivateNode='l'
let g:NERDTreeMapJumpParent='h'
set ideajoin
set surround
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
@achtan
achtan / Translatable
Created October 30, 2014 11:00
Translateble
<?php
namespace App\Dictionary;
use Nette\Localization\ITranslator;
class Translatable
{
try
tell application "Google Chrome" to launch
delay 0.5
end try
try
tell application "Sublime Text" to launch
delay 0.5
end try
<?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.
*/
@achtan
achtan / renameFiles.py
Last active December 14, 2015 02:19
rename files in folder by date created
import datetime
import os
dir = os.getcwd() + '/'
for filename in os.listdir(dir):
newName = datetime.datetime.fromtimestamp(os.path.getmtime(dir + filename)).strftime('%Y%m%d-%H%M%S') + os.path.splitext(filename)[1]
print('rename: ' + filename + ' -> ' + newName)
os.rename(dir + filename, dir + newName)
print('done!')
<?php
use Nette\Latte\Compiler;
use Nette\Latte\MacroNode;
use Nette\Latte\PhpWriter;
class Macros extends \Nette\Latte\Macros\MacroSet {
public static function install(Compiler $compiler) {