Skip to content

Instantly share code, notes, and snippets.

@ionas
ionas / setup.md
Created July 5, 2017 13:41 — forked from xrstf/setup.md
Nutch 2.3 + ElasticSearch 1.4 + HBase 0.94 Setup

Info

This guide sets up a non-clustered Nutch crawler, which stores its data via HBase. We will not learn how to setup Hadoop et al., but just the bare minimum to crawl and index websites on a single machine.

Terms

  • Nutch - the crawler (fetches and parses websites)
  • HBase - filesystem storage for Nutch (Hadoop component, basically)
@ionas
ionas / ffmpeg-install.sh
Created July 27, 2016 14:13 — forked from clayton/ffmpeg-install.sh
Install FFMPEG on OS X with HomeBrew to convert Mp4 to WebM
# Installation
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid
# Easy Peasy
ffmpeg -i video.mp4 video.webm
@ionas
ionas / happy_git_on_osx.md
Created July 11, 2016 13:50 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@ionas
ionas / config.yaml
Last active April 9, 2016 16:39
CakePHP3 custom box via PuPHPet Instructions 1. Download and install Virtualbox 5.x and Vagrant 1.8.x: https://www.virtualbox.org/wiki/Downloads, https://www.vagrantup.com/downloads.html 2. Download config.yaml below. Drag and drop onto https://puphpet.com - customize to your needs if required, before. 3. Join irc://irc.freenode.net/#cakephp and…
vagrantfile:
target: local
vm:
provider:
local:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
box_version: '0'
chosen_virtualizer: virtualbox
virtualizers:
@ionas
ionas / Configure.php
Last active December 31, 2015 13:24
CakePHP 3 App Core Configuration - require configuration to be set.
<?php
/**
* Used to get information stored in Configure. It's not
* possible to store `null` values in Configure.
*
* Acts as a wrapper around Configure::read() and Configure::check().
* The configure value fetched via get is expected to exist.
* In case it does not an exception will be thrown.
*
* Usage:
@ionas
ionas / ServiceUnavailableException.php
Last active December 29, 2015 15:39
CakePHP 3 Service Unavailable Exception HTTP 503
<?php
namespace App\Network\Exception;
use Cake\Network\Exception\HttpException;
/**
* Represents an HTTP 503 error.
*
*/
@ionas
ionas / CakePHP3 friendsofcake search autosearch behavior.php
Last active January 11, 2016 15:39
An CakePHP3 autosearch behavior for the friendsofcake/search plugin
<?php
namespace App\Model\Behavior;
use Cake\ORM\Behavior;
/**
* AutoSearch behavior
*/
class AutoSearchBehavior extends Behavior
{
@ionas
ionas / gist:01151238f7bd55fd3750
Created November 29, 2015 17:46 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@ionas
ionas / dereuromark DS cakephp-sandbox DS build.sh
Created August 31, 2015 13:03
dereuromark DS cakephp-sandbox DS build.sh
#!/bin/bash
# Warning: This is NOT a productive script, but for local dev envs only!
echo "### INSTALL/UPDATE ###";
php composer.phar selfupdate
git pull
php composer.phar install --prefer-dist --no-dev --optimize-autoloader --no-interaction
jonas@server:/var/www/Foo$ bin/cake bake model all --force; echo $?cle
Welcome to CakePHP v3.0.0-beta2 Console
---------------------------------------------------------------
App : src
Path: /var/www/Foo/src/
---------------------------------------------------------------
One moment while associations are detected.
Baking table class for Nations...