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
@sorenmalling
sorenmalling / commandline
Created September 17, 2015 08:45
Installing TYPO3 CMS 7.4 with composer and typo3_console
# Just read the help
soren@kevin  ~/Sites/typo3-hyttekort  ./typo3cms help install:setup
Alpha version of a setup command. Use with care and at your own risk!
COMMAND:
typo3_console:install:setup
USAGE:
/Users/soren/Sites/typo3-hyttekort/./typo3cms ./typo3cms install:setup [<options>]
@sineld
sineld / laravel-upload-resize.php
Created September 25, 2012 08:11
Laravel File Upload And Resize
<?php
// Resizer and Image Manipulation
// Based on: http://forums.laravel.com/viewtopic.php?id=2648
public function post_edit_logo($id)
{
$rules = array(
'image' => 'image',
);
var seafloor = L.tileLayer('tiles/nz-seafloor/{z}/{x}/{y}.png', {
maxZoom: 9,
attribution: 'Map data from <a href="http://www.niwa.co.nz/our-science/oceans/bathymetry">NIWA</a>'
});
var topo = L.tileLayer('tiles/nz-topo/{z}/{x}/{y}.png', {
attribution: '<a href="http://data.linz.govt.nz/">LINZ</a>, <a href="http://lris.scinfo.org.nz/">LRIS</a>'
});
var map = new L.Map('map', {
@purwandi
purwandi / deploy.rb
Created November 19, 2012 13:09
Laravel Capistrano Receipes
set :application, "App Name" # Your app name
set :repository, "git@github.com:xxxxx/xxx.git" # Your git repository
set :document_root, "/home/user/www/awesome_app"
set :deploy_via, :remote_cache
# SSH Settings
set :user, "user_ssh"
set :password, "password_ssh"
set :use_sudo, false
@fedir
fedir / getFilesDetailedStatisticsOrderingBySize.sh
Created May 31, 2013 09:54
Find files detailed statistics in shell : filesize, path, date of last access, date of last status change, date of last modification (in locale format; in unixstamp), ordering by size
#!/bin/bash
# ref. : man find
# printf options
# %p Files name.
# %P Files name with the name of the command line argument under which it was found removed.
# %s Files size in bytes.
# %Ak Files last access time in the format specified by k
# %Ck Files last status change time
# %Tk Files last modification time
# Time options k
@n1k0
n1k0 / private1.js
Last active December 19, 2015 13:49
Two alternatives to bring private methods to JavaScript. Prefer method 2.
(function(exports) {
function Universe() {
this.partialAnswer = 21;
}
exports.Universe = Universe;
// private methods
var privatePrototype = {
_computeAnswer: function() {
return this.partialAnswer * 2;
@fedir
fedir / fluidStandaloneView.php
Created July 15, 2013 16:08
Standalone views with Fluid with TYPO3 4.5.x LTS // via http://developpeurtypo3.wordpress.com/2011/03/03/fluid-sans-extbase/ * useful for hooks also, when we are working with non-extbase extensions
<?php
$template = t3lib_extMgm::extPath($this->extKey) . $this->conf['template'];
$view = t3lib_div::makeInstance('Tx_Fluid_View_StandaloneView');
$view->setTemplatePathAndFilename($template);
$view->assign('data', $this->data);
$view->render();
@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
@karmi
karmi / .gitignore
Last active December 24, 2015 14:53
Build a virtual machine with Elasticsearch from scratch with Vagrant
.vagrant
Gemfile.lock
Berksfile.lock
tmp/