Skip to content

Instantly share code, notes, and snippets.

View redrick's full-sized avatar
🏡
Working from home

Andrej Antas redrick

🏡
Working from home
View GitHub Profile
@redrick
redrick / .powrc
Last active August 29, 2015 14:03
.powrc to use with pow and rvm 1.25 (.ruby-version/.ruby-gemset)
if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".ruby-version" ] && [ -f ".ruby-gemset" ] ; then
source "$rvm_path/scripts/rvm"
rvm use `cat .ruby-version`@`cat .ruby-gemset`
fi
@redrick
redrick / config.js
Created June 13, 2014 19:37
ckeditor config.js I widely use in my applications
CKEDITOR.editorConfig = function( config )
{
/* Filebrowser routes */
// The location of an external file browser, that should be launched when "Browse Server" button is pressed.
config.filebrowserBrowseUrl = "/ckeditor/attachment_files";
// The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Flash dialog.
config.filebrowserFlashBrowseUrl = "/ckeditor/attachment_files";
@redrick
redrick / README.md
Last active December 27, 2015 13:39

Commands examples

If the namespace is not used then the commands will perform on top of the default database. bundle exec rake db:create bundle exec rake db:migrate

By using the namespace we are going to use all the configuration for our alternate DB. bundle exec rake store:db:create bundle exec rake store:db:migrate

@redrick
redrick / elasticsearch_centos.sh
Last active December 26, 2015 10:19 — forked from rajraj/es.sh
cd ~
sudo yum update
sudo yum install java-1.7.0-openjdk -y
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.5.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
@redrick
redrick / RoR_fedora16Verne
Created January 17, 2012 18:24
Ruby on Rails development environment installation
sudo yum update :)
sudo yum install git
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
sudo yum install gcc
rvm install 1.9.2
@redrick
redrick / java help
Created January 9, 2012 18:44
addinional java
================ some work with containers on specific container....
public class CountryUnionImpl implements CountryUnion {
private Set<Country> countries = new HashSet<Country>();
public boolean add(Country country) {
if (country == null) return false;
if (countries.contains(country)) return false;
return countries.add(country);
@redrick
redrick / java_2_exam
Created November 30, 2011 11:49
Some basics for java
Some Arrays and stuff to use with them....
private String[] receivers; // definition...
this.receivers = targets.clone() // not just this.recievers = recievers !! unsafe
for each is kinda usefull here...
for (int i: recievers) {
System.out.println(recievers[i].name);
}
@redrick
redrick / coreutils - coverage
Created November 3, 2011 06:23
my preparation for bachelors degree consultation
coreutils - the coverage (Fedora 2.6.40.6-0.fc15.i686)
git clone git://git.savannah.gnu.org/coreutils.git - DONE
README-prereq - DONE (had to use changed one --> see gist 1273797)
README-hacking - DONE
./configure CFLAGS="-fprofile-arcs -ftest-coverage" - DONE
@redrick
redrick / gem install pg
Created November 1, 2011 08:15
unable to install pg gem - *** extconf.rb failed ***
(Operating system is Fedora 2.6.40.6-0.fc15.i686)
Hi there quiet recently I had a big problem with this guy - gem install pg
It threw me :
$ gem install pg
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
@redrick
redrick / README-prereq
Created October 9, 2011 15:20
I found a small mistake in coreutils GNU project documentation which prevented me from compiling the source, hope it will help someone...
This gives some notes on obtaining the tools required for development.
I.E. the tools checked for by the bootstrap script and include:
- Autoconf <http://www.gnu.org/software/autoconf/>
- Automake <http://www.gnu.org/software/automake/>
- Bison <http://www.gnu.org/software/bison/>
- Gettext <http://www.gnu.org/software/gettext/>
- Git <http://git.or.cz/>
- Gperf <http://www.gnu.org/software/gperf/>
- Gzip <http://www.gnu.org/software/gzip/>