Skip to content

Instantly share code, notes, and snippets.

<% unless @exif.gps.blank? %>
<p class="map">
<% img_url = "http://staticmap.openstreetmap.de/staticmap.php?center=" + @exif.gps.latitude.to_s + "," + @exif.gps.longitude.to_s + "&zoom=7&size=640x480&markers=" + @exif.gps.latitude.to_s + "," + @exif.gps.longitude.to_s + ",red-pushpin" %>
<% map_url = "http://www.openstreetmap.org/?mlat=" + @exif.gps.latitude.to_s + "&mlon=" + @exif.gps.longitude.to_s + "&zoom=12";%>
<%= link_to(image_tag(mapimage_path(img_url)), map_url) %>
</p>
<% end %>
#!/usr/bin/env ruby -wU
#
# This script uses the command line twitter client https://github.com/twitter/twurl
# You have to authorize Twurl one time before you can use ist, please read the
# README for Twurl which describes how to do it.
# What it basically does is it sets the flag that you don't want to see
# any retweets of any users at all.
require 'json'
function fish_prompt
if not set -q -g __fish_robbyrussell_functions_defined
set -g __fish_robbyrussell_functions_defined
function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)

Keybase proof

I hereby claim:

  • I am jeena on github.
  • I am jeena (https://keybase.io/jeena) on keybase.
  • I have a public key whose fingerprint is AC45 211F C254 EC42 F04E 3291 64C6 D176 70AC ABA1

To claim this, I am signing this object:

Refused to get unsafe header "Link" on line: 1 Source:
Failed to update/create app-auth on line: 4899 Source: https://admin.cupcake.io/assets/application-b1cede3f08bc8da0ddf238615a201a28.js
Refused to get unsafe header "Link" on line: 1 Source:
Failed to update/create app-auth on line: 4899 Source: https://admin.cupcake.io/assets/application-b1cede3f08bc8da0ddf238615a201a28.js
As a former iOS developer who quit his job to go back to school I was excited to hear about Firefox OS because paying $100 every year just to be able to install your own software on your own hardware doesn’t sound like a sweet solution for a student.
# Buying a device
Obviously Mozilla wouldn’t require people to do things like that. So when I was in Poland on vacation I got me an Alcatel One Touch Fire with Firefox OS on it, as far as I know you can only buy a device with Firefox OS in Spain and Poland yet.
I had to buy it via the internet and ask my father for his polish ID (I don’t have one) to get it for 400 PLN (ca. 100 €) because the T-mobile shops weren’t allowed to sell it to me without a contract, which would have ended up about 1000 PLN (ca 240 €), which this phone clearly isn’t worth.
# Development with jQuery Mobile
#!/usr/bin/env ruby -wKU
require 'net/http'
require 'uri'
require 'openssl'
require 'json'
require 'cgi'
require 'rack/utils'
uri = URI("https://app.tent.is/api/posts?post_types=https%3A%2F%2Ftent.io%2Ftypes%2Fpost%2Fstatus%2Fv0.1.0&limit=200")
You make a connection to the server via your socket and then send
this (without Token because you don't have one yet):
-----------------------------
Server-Command: hello
Content-Length: 0
-----------------------------
A new table will begenerated for you and you get a token in the
@jeena
jeena / index.html
Last active December 14, 2015 09:29
import sys, os
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *
app = QApplication(sys.argv)
web = QWebView()
web.page().settings().setAttribute(QWebSettings.LocalContentCanAccessRemoteUrls, True)