Skip to content

Instantly share code, notes, and snippets.

View promisedlandt's full-sized avatar

Nils Landt promisedlandt

View GitHub Profile
Contacting host: dav.mailbox.org:443 [2 times]
Getting event 1 of 105
Property "LOCATION" deleted
Saving file /home/nl/.local/state/emacs/org-caldav-inbox_mailbox_private.org...
Wrote /home/nl/.local/state/emacs/org-caldav-inbox_mailbox_private.org
Getting event 2 of 105
Property "LOCATION" deleted
Saving file /home/nl/.local/state/emacs/org-caldav-inbox_mailbox_private.org...
Wrote /home/nl/.local/state/emacs/org-caldav-inbox_mailbox_private.org
Getting event 3 of 105
def testmethod1
end
def testmethod2
end
# try test<space>
# expected: test followed by a space
# actual: testmethod2 followed by a space
{"data":[{"id":"1","type":"dominions4_eras","attributes":{"name":"Early Ages","description":"The early ages are full of magic and civilization is at its beginning. At most places iron has not been thought of yet and armours and weapons are made of wood, stone and bronze. Mages are most powerful in this age and there is an abundance of magic resources. It is a time of legends.","abbreviation":"EA","slug":"early-ages"},"relationships":{"nations":{"data":[{"id":"10","type":"dominions4_nations"},{"id":"15","type":"dominions4_nations"},{"id":"18","type":"dominions4_nations"},{"id":"84","type":"dominions4_nations"},{"id":"95","type":"dominions4_nations"},{"id":"13","type":"dominions4_nations"},{"id":"14","type":"dominions4_nations"},{"id":"16","type":"dominions4_nations"},{"id":"17","type":"dominions4_nations"},{"id":"19","type":"dominions4_nations"},{"id":"20","type":"dominions4_nations"},{"id":"83","type":"dominions4_nations"},{"id":"85","type":"dominions4_nations"},{"id":"86","type":"dominions4_nations"},{"id":"
{
"name": "dominionsserver",
"dependencies": {
"ember": "~2.3.0",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.1.0",
"ember-cli-test-loader": "0.2.1",
"ember-qunit-notifications": "0.1.0",
"jquery": "^1.11.3",
"loader.js": "ember-cli/loader.js#3.2.1",
"material-design-lite": "~1.0.4",
class PolicyTest < ActiveSupport::TestCase
def assert_permissions(current_user, record, available_actions, permissions_hash = {})
permissions_hash.each do |action, should_be_permitted|
if should_be_permitted
assert_permit current_user, record, action
else
refute_permit current_user, record, action
end
end
@promisedlandt
promisedlandt / mtgapi.com by text
Created February 8, 2014 03:01
Superfluous array in mtgapi.com response by text
curl http://mtgapi.com/api/v1/fetch/search/tundra\?token\=censored | json_pp
[
[
{
"cmc" : "",
"image" : "http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=202424&type=card",
"text" : [],
"name" : "Tundra",
},
@promisedlandt
promisedlandt / gist:8063053
Created December 20, 2013 23:03
Vagrantfile to reproduce Vagrant 1.4.1 / Fedora 20 error
Vagrant.configure("2") do |config|
config.vm.hostname = "fedora-test"
config.vm.box = "opscode-fedora-20"
config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-20_chef-provisionerless.box"
config.vm.network :private_network, ip: "33.33.33.200"
end
@promisedlandt
promisedlandt / gist:8063036
Created December 20, 2013 23:02
Vagrant 1.4.1 with Fedora 20 guest with private ip
INFO global: Vagrant version: 1.4.1
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Linux"
INFO global: VAGRANT_INSTALLER_ENV="1"
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/kernel_v2/plugin.rb
INFO manager: Registered plugin: kernel
Excon::Errors::SocketError: amazon_dns_zone[promisedlandt.de] (/var/cache/chef/cookbooks/generic_dns/providers/record.rb line 6) had an error: Excon::Errors::SocketError: SSL_write:: bad write retry (OpenSSL::SSL::SSLError)
/opt/chef/embedded/lib/ruby/1.9.1/openssl/buffering.rb:375:in `syswrite_nonblock'
/opt/chef/embedded/lib/ruby/1.9.1/openssl/buffering.rb:375:in `write_nonblock'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.20.1/lib/excon/socket.rb:156:in `write'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.20.1/lib/excon/ssl_socket.rb:82:in `write'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.20.1/lib/excon/connection.rb:138:in `request_call'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.20.1/lib/excon/middlewares/mock.rb:79:in `request_call'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.20.1/lib/excon/middlewares/instrumentor.rb:22:in `request_call'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.20.1/lib/excon/middlewares/base.rb:15:in `request_call'
/opt/chef/embedde
@promisedlandt
promisedlandt / gist:1134518
Created August 9, 2011 16:37
git - restore deleted file
git checkout $(git rev-list -n 1 HEAD -- "$file")^ -- "$file"