Skip to content

Instantly share code, notes, and snippets.

View keradus's full-sized avatar
💭
I may be slow to respond.

Dariusz Rumiński keradus

💭
I may be slow to respond.
View GitHub Profile
@cu12
cu12 / overriding.md
Last active September 22, 2016 09:04
Overriding PHP memory_limit in Travis

I was wondering why Travis is still using the default 1G memory limit while I was trying to override it.

The problem is that PHP loads custom ini files in alphabetical order, so travis.ini was loading after my memory.ini, overriding whatever I had there regarding memory_limit.

So the solution would be to prepend your custom ini files with a letter after t.

.travis.yml

before_install:
 - phpenv config-add ci/x_apcu.ini
@pbock
pbock / buergerbot.rb
Last active April 22, 2024 10:58
Bürgerbot: Refreshes the Berlin Bürgeramt page until an appointment becomes available, then notifies you.
#!/usr/bin/env ruby
require 'watir-webdriver'
def log (message) puts " #{message}" end
def success (message) puts "+ #{message}" end
def fail (message) puts "- #{message}" end
def notify (message)
success message.upcase
system 'osascript -e \'Display notification "Bürgerbot" with title "%s"\'' % message
rescue StandardError => e
@mudassir0909
mudassir0909 / ember_unknown_property_hook.js
Last active August 22, 2016 13:15
Ember unknownProperty & setUnknownProperty hooks defined inside Ember.Observable mixin
// Little background about unknown properties
var myObject = Ember.Object.create({name: 'hi'}); // a plain simple ember object
/*
all the properties defined on the object are known properties
so the property "name" is a known property for myObject,
but any other properties which are not defined on this object are unknown properties
*/
// age is an unknown property as we did not set "age" yet
myObject.get("age"); // => undefined