View keybase.md

Keybase proof

I hereby claim:

  • I am berkes on github.
  • I am berkes (https://keybase.io/berkes) on keybase.
  • I have a public key whose fingerprint is 31D5 9C42 A7BB 5038 CCC3 0C43 3A10 7C51 9147 23F8

To claim this, I am signing this object:

View fifo_hash.rb
require "pp"
require "benchmark"
# Yea. Extremely slow and prolly Linux only
def mem_sampler
stat = GC.stat
stat.map do |k,v|
"#{k}\t#{v}"
end.join("\n")
end
View log-git-flow-feature
set -e
working_dir=$(pwd)
feature=$2
action=$1
now=$(date -u +"%Y-%m-%dT%H:%M:%SZ") # ISO8601
echo "[$now] $working_dir $action $feature" >> ~/.git-flow-feature.log
View deler.sh
number=$1
prime=true
#for i in {1.."$number"}
for i in $(seq 2 1 $(($number - 1)))
do
if [ $(($number % $i)) -eq 0 ]
then
prime=false
out="$out \n number $i a factor"
fi
View application_helper.rb
def flash_errors_for(model)
return unless model.errors.any?
messages = [I18n.t("errors.messages.not_saved",
count: model.errors.size,
resource: model.model_name)]
# Sanitize any errors
messages << model.errors.to_a.map(&:html_safe)
# assign to alert, mark as safe
View swapesc
#!/bin/bash
current=$(dconf read /org/gnome/desktop/input-sources/xkb-options)
swapped="['caps:swapescape']"
capslock="['caps:capslock']"
echo "Current status: $current"
if [ "$current" == "$swapped" ]
then
echo "Making caps and escape WORK NORMALLY"
View Marnick.java
import robocode.*;
import java.util.Random;
public class Marnick extends Robot {
boolean found = false;
int movingCounter = 72;
public void run() {
while (true) {
if(movingCounter > 0 || found) {
movingCounter--;
View TweedeHelft.java
/**
* Copyright (c) 2001-2014 Mathew A. Nelson and Robocode contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://robocode.sourceforge.net/license/epl-v10.html
*/
package sample;
View Klaas.java
package sample;
import java.util.Random;
import robocode.Robot;
import robocode.Rules;
import robocode.ScannedRobotEvent;
public class Klaas extends Robot {
private int scannedX;
View Evilbot9000.java
package EB9000;
import robocode.*;
//import java.awt.Color;
// API help : http://robocode.sourceforge.net/docs/robocode/robocode/Robot.html
/**
* Evilbot9000 - a robot by (your name here)
*/
public class Evilbot9000 extends Robot