Skip to content

Instantly share code, notes, and snippets.

View fedir's full-sized avatar
🌤️
The sun is behind every cloud

Fedir RYKHTIK fedir

🌤️
The sun is behind every cloud
View GitHub Profile
@fedir
fedir / filndAllFiles.sh
Created September 2, 2013 09:59
List all files in current folder
#!/bin/bash
find . -type f -print0 | while read -d $'\0' file
do
echo "$file"
done
@fedir
fedir / upFork.sh
Last active December 24, 2015 13:59
Update forked repository #Github
git remote add upstream git@github.com:FluidTYPO3/flux.git
git fetch upstream
git checkout master
git merge upstream/master
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
git push origin master
@fedir
fedir / .htaccess
Last active May 17, 2017 17:15
Protection with .htpasswd / .htaccess
AuthName "Password Protect Directory"
AuthType Basic
AuthUserFile /home/www/site/.htpasswd
<Limit GET POST PUT>
Require valid-user
</Limit>
@maddy2101
maddy2101 / gist:7340636
Created November 6, 2013 17:35
TypoLink ViewHelper that accepts and extends the parameters for the typolink function
<?php
/***************************************************************
* Copyright notice
*
* (c) 2013
* @author Anja Leichsenring <maddy@typovision.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
@fedir
fedir / htpasswd.sh
Last active December 31, 2015 12:39
Generate htpasswd without htpasswd installed (with Perl which is installed everywhere)
perl -le 'print "yourusername:".crypt("yourpassword", "salt")' >> /home/htpasswd; cat /home/htpasswd
@NamelessCoder
NamelessCoder / install_typo3_62_ft3.sh
Last active January 13, 2017 10:00
Bash script to install TYPO3 6.2 LTS (dev) and FluidTYPO3 extensions (dev)
#!/usr/bin/env bash
# phase one: core install
# Pro tip: edit the script and use this repository instead to try out the
# codename "Awesome Ocelot" project - which should be even faster than the
# bare 6.2 core: https://github.com/NamelessCoder/TYPO3.CMS.git
# Live demo of "Awesome Ocelot" is at http://staging.namelesscoder.net
git clone https://github.com/TYPO3/TYPO3.CMS.git --depth 1
@kraftb
kraftb / gist:8844198
Created February 6, 2014 13:33
Counting TYPO3 pages in a branch
1. Create a table which helps us for this task:
CREATE TABLE ClosureTable (ancestor_id INT NOT NULL, descendant_id INT NOT NULL, path_length INT NOT NULL, PRIMARY KEY (ancestor_id, descendant_id));
2. Execute the following queries:
INSERT INTO ClosureTable (ancestor_id, descendant_id, path_length) SELECT 0,0,0;
INSERT INTO ClosureTable (ancestor_id, descendant_id, path_length) SELECT uid, uid, 0 FROM pages;
@Natim
Natim / cutfdu.py
Created February 14, 2014 15:32
Faster count uniq cut file (for flake8 or log for instance) (Thx @boblefrag for http://snippet.gabory.fr/snippet/9/)
# From http://snippet.gabory.fr/snippet/9/
# Similar to `cut -d ":" -f 1 | sort | uniq -c | sort -n`
#
# Usage: flake8 venv | python cutfdu.py
# Mock : flake8 venv | cut -d ":" -f 1 | sort | uniq -c | sort -n
#
# From Natim with love (2014-02-14)
import itertools
import sys
@alienlebarge
alienlebarge / 01-GruntJS-Patternlab-TYPO3.md
Last active August 29, 2015 13:57
How we use GruntJS with patternlab and TYPO3 TemplaVoilà
@phbergsmann
phbergsmann / gist:9975380
Created April 4, 2014 14:04
NGINX configuration for TYPO3 with HHVM and PHP-FPM Fallback
server {
listen 80;
server_name localhost;
root /var/www;
client_max_body_size 32M;
location = /clear.gif {
empty_gif;
expires max;