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 / 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 / .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

Keybase proof

I hereby claim:

  • I am redrick on github.
  • I am redrick (https://keybase.io/redrick) on keybase.
  • I have a public key whose fingerprint is 0A34 8925 3347 3CB9 2126 001A 68DB E21C 4480 515D

To claim this, I am signing this object:

@redrick
redrick / distribution.rb
Last active August 29, 2015 14:21
Prize distribution
class HashMap
def initialize
@prizes = [35, 25, 20, 15, 5]
@participations = [
Participation.new(10),
Participation.new(10),
Participation.new(10),
Participation.new(6),
Participation.new(4),
Participation.new(4)
@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/>
@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 / 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 / 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 / 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 / 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