Skip to content

Instantly share code, notes, and snippets.

class HashNode < Node
attr_reader :array
def initialize(filename, line, array)
super
@array = array
end
def bytecode(g)
pos(g)
@mokus80
mokus80 / gist:9137062
Created February 21, 2014 16:09
Heroku log for
➜ learners_directory git:(master) ✗ heroku logs
2014-02-20T12:24:07.218601+00:00 heroku[web.1]: State changed from starting to up
2014-02-20T12:24:07.879373+00:00 heroku[web.1]: Process exited with status 143
2014-02-20T12:24:00.991860+00:00 heroku[web.1]: State changed from up to starting
2014-02-20T12:24:15.956297+00:00 app[web.1]: => Booting WEBrick
2014-02-20T12:24:15.956297+00:00 app[web.1]: => Rails 4.0.0 application starting in production on http://0.0.0.0:23477
2014-02-20T12:24:15.956297+00:00 app[web.1]: => Run `rails server -h` for more startup options
2014-02-20T12:24:15.956297+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-02-20T12:24:15.956297+00:00 app[web.1]: Started GET "/" for 77.185.30.96 at 2014-02-20 12:24:15 +0000
2014-02-20T12:24:15.956297+00:00 app[web.1]: Started GET "/" for 77.185.30.96 at 2014-02-20 12:24:15 +0000
Rails.application.config.middleware.use OmniAuth::Builder do
yaml_file_path = "#{Rails.root}/config/github.yml"
local_env_path = "#{Rails.root}/config/local_env.yml"
if File.exists? (yaml_file_path)
config = YAML.load_file(yaml_file_path)
client_id = config['CLIENT_ID']
secret = config['CLIENT_SECRET']
else
client_id = config['CLIENT_ID']
secret = config['CLIENT_SECRET']
<% if resource.user.admin == true %>
Posted by Editor on <%= resource.created_at.strftime("%B %d, %Y") %>
<% else %>
Posted by <%= link_to "#{resource.user.name}", user_path(resource.user) %> on <%= resource.created_at.strftime("%B %d, %Y") %>
<% end %>
Shopping:
http://www.hadakft.hu/en/uzlet-terkep/
They claim to sell 'english second hand clothes', and while the clothes are imported, i don't think they are actually second hand but still very cheap. If you dig a little you can find some real gems. One of the better shops is located on the ground floor of Corvin mall.
Castle District:
Touristy but very beautiful. Great views of the city. The restaurants are overpriced and not very good, from what I have heard. Don't pay to go up the Fisherman's Bastion, it there is no admission after 7, perhaps even earlier in the winter.
<body>
<form accept-charset="utf-8" action="<%= search_path %>">
<div class="where">
<input class="typeahead" id="where" type="text" placeholder="Ort, PLZ" id="user-search" spellcheck="false" />
<script src="//cdn.jsdelivr.net/jquery/1.11.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.10.4/typeahead.bundle.min.js"></script>
<script src="//cdn.jsdelivr.net/algoliasearch/latest/algoliasearch.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
// Replace the following values by your ApplicationID and ApiKey.
$(document).ready(function() {
// Replace the following values by your ApplicationID and ApiKey.
var algolia = new AlgoliaSearch('S28V4HJTQ8', '3aef8f24cf93555ef37e43432a6b41a8');
// set environment
var env = $("html").data("env")
// replace YourIndexName by the name of the index you want to query.
var index = algolia.initIndex("locations" + "_" + env);
// typeahead.js initialization
page = @options["page"] || 0
per = @options["per"] || 10
lat = @options["lat"]
lng = @options["lng"]
epid = @options["leadpipe_account_id"]
radius = @options["radius"].to_i * 1000 # convert km to m
results = IndexManager.search_index.search("", {
attributesToRetrieve: ["leadpipe_account_id"],
aroundLatLng: "#{lat},#{lng}",
(function(i){function q(e){var j=e.originalEvent.changedTouches[0],f="";switch(e.type){case "touchmove":f="mousemove";break;case "touchend":f="mouseup";break;default:return}var l=document.createEvent("MouseEvent");l.initMouseEvent(f,true,true,window,1,j.screenX,j.screenY,j.clientX,j.clientY,false,false,false,false,0,null);j.target.dispatchEvent(l);e.preventDefault()}i.fn.rateit=function(e,j){var f={},l="init";if(this.length==0)return this;var m=i.type(e);if(m=="object"||e===undefined||e==null)f=i.extend({},
i.fn.rateit.defaults,e);else if(m=="string"&&j===undefined)return this.data("rateit-"+e);else if(m=="string")l="setvalue";return this.each(function(){var c=i(this),a=function(g,h){return c.data("rateit-"+g,h)};c.hasClass("rateit")||c.addClass("rateit");var n=c.css("direction")!="rtl";if(l=="setvalue"){if(!a("init"))throw"Can't set value before init";if(e=="readonly"&&!a("readonly")){c.find(".rateit-range").unbind();a("wired",false)}if(a("backingfld")){var b=i(a("backingfld"));e=="value"&&b.val(j);
if(e=="m
$(document).ready(function() {
$('#show-tab').click(function(){
var current = $(this);
var siblings = current.siblings();
siblings.parent('li').removeClass('active');
siblings.attr({'aria-selected': false});
current.parent('li').addClass('active');
current.attr({'aria-selected': true});
});
});