Skip to content

Instantly share code, notes, and snippets.

View nurey's full-sized avatar

Ilia Lobsanov nurey

View GitHub Profile

Keybase proof

I hereby claim:

  • I am nurey on github.
  • I am ilia (https://keybase.io/ilia) on keybase.
  • I have a public key whose fingerprint is ADC2 0622 48F3 E61F 899A 9BD6 FCC9 4A43 EE4F A3A2

To claim this, I am signing this object:

select ST_Area(the_geom), ST_Area(the_geom::geography) from geospatial_lookup where id = 23578;
st_area | st_area
--------------------+------------------
0.0706906461999737 | 632842160.137236
(1 row)
@nurey
nurey / gist:2255271
Created March 30, 2012 21:29
Get Gitbox.app and FileMerge working together again after upgrading Xcode to 4.3
sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer
@nurey
nurey / students.rb
Last active February 26, 2016 02:57
# this requires ruby 2.3
students = {
:"bobby crimble" => {
math: 68,
physics: 77,
phys_ed: 81,
english: 71
},
:"anne shirley" => {
SELECT "places".* FROM (
SELECT
*,
ST_Distance_Sphere(geom, 'SRID=4326;POINT(-79.3937393 43.6526704)') as distance
FROM places
ORDER by geom <#> 'SRID=4326;POINT(-79.3937393 43.6526704)' LIMIT 50
) AS places
WHERE "places"."place_category_id" = 10 ORDER BY distance ASC LIMIT 5
@nurey
nurey / cocos2d.podspec
Created March 25, 2013 22:56
Podspec for cocos2d 2.1.beta3. There's not an official podspec for this version.
Pod::Spec.new do |s|
s.name = 'cocos2d'
s.license = 'MIT'
s.version = '2.1.beta3'
s.summary = 'cocos2d for iPhone is a framework for building 2D games, demos, and other graphical/interactive applications.'
s.description = 'cocos2d for iPhone is a framework for building 2D games, demos, and other graphical/interactive applications for iPod Touch, iPhone, iPad and Mac. It is based on the cocos2d design but instead of using python it, uses objective-c.'
s.homepage = 'http://www.cocos2d-iphone.org'
s.author = { 'Ricardo Quesada' => 'ricardoquesada@gmail.com', 'Zynga Inc.' => 'https://zynga.com/' }
s.source = {:git => 'https://github.com/cocos2d/cocos2d-iphone.git', :tag => 'release-2.1-beta3'}
qua:irs ilia$ bundle exec rake figaro:heroku[irs] --trace
** Invoke figaro:heroku (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute figaro:heroku
/Users/ilia/.rvm/gems/ruby-2.0.0-p0@irs/gems/bundler-1.3.0/lib/bundler/definition.rb:361:in `validate_ruby!': Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0 (Bundler::RubyVersionMismatch)
from /Users/ilia/.rvm/gems/ruby-2.0.0-p0@irs/gems/bundler-1.3.0/lib/bundler.rb:116:in `setup'
from /Users/ilia/.rvm/gems/ruby-2.0.0-p0@irs/gems/bundler-1.3.0/lib/bundler/setup.rb:17:in `<top (required)>'
from /usr/local/heroku/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/heroku/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
[2012-12-03 11:15:45AM] No connect attempt: in connect attempt loop.
[2012-12-03 11:15:45AM] [osc_tell] /pod/state string: <<bt_connected>> [/osc_tell]
[2012-12-03 11:15:45AM] [osc_tell] /pod/state string: <<bt_connected>> [/osc_tell]
[2012-12-03 11:15:45AM] Device #0 (I): EXCODE level: 0 CODE: 0x80 vLength: 12 Data value(s): EE 08 00 00 08 00 00 05 00 00 F8 1F
[2012-12-03 11:15:45AM] Device #0 (I): EXCODE level: 0 CODE: 0x80 vLength: 12 Data value(s): EE 08 00 00 08 00 00 04 00 00 F8 1F
[2012-12-03 11:15:45AM] Device #0 (I): EXCODE level: 0 CODE: 0x80 vLength: 12 Data value(s): EE 08 00 00 08 00 00 04 00 00 F8 1F
[2012-12-03 11:15:46AM] Device #0 (I): EXCODE level: 0 CODE: 0x80 vLength: 12 Data value(s): EE 08 00 00 08 00 00 03 00 00 F8 1F
[2012-12-03 11:15:46AM] Device #0 (I): EXCODE level: 0 CODE: 0x80 vLength: 12 Data value(s): EE 08 00 00 08 00 00 08 00 00 F8 1F
[2012-12-03 11:15:46AM] Device #0 (I): EXCODE level: 0 CODE: 0x80 vLength: 12 Data value(s): EE 08 00 00 08 00 00 08 00 00 F8 1F
[2012-12-
var socket = chrome.socket || chrome.experimental.socket;
var socketInfo;
var connected = false;
socket.create('udp', {}, function(createInfo) {
socketInfo = createInfo;
socket.connect(socketInfo.socketId, '127.0.0.1', 5555, function(connectResult) {
connected = (connectResult == 0);
console.log(connected ? "connected" : "not connected");
socket.read(socketInfo.socketId, function(readInfo) {
$ perl Makefile.PL
include /Users/ilia/Devel/carton/inc/Module/Install.pm
include inc/Module/Install/Metadata.pm
include inc/Module/Install/Base.pm
include inc/Module/Install/Makefile.pm
Unknown function is found at Makefile.PL line 9.
Execution of Makefile.PL aborted due to runtime errors.
If you're a contributor to a project, you may need to install
some Module::Install extensions from CPAN (or other repository).