Skip to content

Instantly share code, notes, and snippets.

Avatar

Volkan Unsal volkanunsal

View GitHub Profile
@volkanunsal
volkanunsal / Dockerfile.node
Last active Aug 30, 2018
Moving to Heroku container stack with Geospatial libraries
View Dockerfile.node
FROM volkanunsal/ruby
FROM volkanunsal/node as node
FROM volkanunsal/ruby:latest
COPY --from=node /usr/include/node /usr/include/node
COPY --from=node /usr/bin/node /usr/bin/node
COPY --from=node /usr/local/share/yarn /usr/local/share/yarn
COPY --from=node /usr/lib/node_modules /usr/lib/node_modules
RUN ln -s /usr/local/share/yarn/bin/yarn /usr/bin/yarn \
View error.txt
Run options: --seed 15413
# Running:
E
Error:
BugTest#test_association_stuff:
ArgumentError: unknown keyword: array
View Dockerfile
FROM ubuntu:14.04
# Install Node.js
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install --yes curl build-essential python zlib1g-dev clang make pkg-config
# Install Node
RUN curl --silent --location https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install --yes nodejs
View resource_mapping.rb
FromListing = ::Citi::DataMapper.new(*[
:name,
:address_street_name,
:description,
:incentives,
:url,
:cap_rate,
:lease_type,
:company_id,
:photo_urls
View perf.rake
namespace :perf do
task :rails_load do
ENV["RAILS_ENV"] ||= "production"
ENV['RACK_ENV'] = ENV["RAILS_ENV"]
ENV["DISABLE_SPRING"] = "true"
ENV["SECRET_KEY_BASE"] ||= "foofoofoo"
ENV['LOG_LEVEL'] ||= "FATAL"
require 'rails'
View payload.json
{
"layers": [
{
"options": {
"cartocss": "#nyc_parcels {polygon-opacity:0.6; polygon-fill: #FFB927; [zoom > 14] {line-width: 0.6; line-color: white;}}",
"cartocss_version": "2.1.1",
"interactivity": "cartodb_id,borough,lotarea,landuse_name,yearbuilt,the_geom,ownername,lotarea,lotfront,lotdepth,assesstot,assessland,numbldgs,yearbuilt,bldgarea,numfloors,landuse,block,lot,bbl,unitstotal,condono,unitsres,easements,resarea,comarea,officearea,factryarea,otherarea,builtfar,residfar,commfar,zonedist1,borough,address",
"sql": "SELECT\n source.* FROM (SELECT * FROM nyc_parcels) source,\n (SELECT ST_GeomFromGeoJSON('{\"type\":\"MultiPolygon\",\"coordinates\":[[[[-73.9793586730957,40.7153870771602],[-74.0231323242188,40.6965181180946],[-74.0301704406738,40.7174688416884],[-73.9793586730957,40.7153870771602]]]]}') the_geom) target\n WHERE\n ST_Intersects(ST_SetSRID(source.the_geom, 4326),\n ST_SetSRID(target.the_geom, 4326))",
"layerIndex
View gist:d1cadef212d88d87c6e29518047eebba
eval("'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _react = __webpack_require__(66);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reflexbox = __webpack_require__(2371);\n\nvar _styles = __webpack_require__(2501);\n\nvar _utilsMakeTable = __webpack_require__(2499);\n\nvar _utilsMakeTable2 = _interopRequireDefault(_utilsMakeTable);\n\nvar _actions = __webpack_require__(411);\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _reactRedux = __webpack_require__(391);\n\nvar _selectors = __webpack_require__(2502);\n\nvar _classnames = __webpack_require__(1775);\n\nvar _classnames2 = _interopRequireDefault(_classnames);\n\n__webpack_r
View main.go
package main
import (
"encoding/json"
"log"
"net/http"
"time"
"github.com/jmoiron/sqlx"
// _ "github.com/lib/pq"
View TransitionParser.py
class TransitionParser(object):
"""
An arc-eager transition parser
"""
def __init__(self, transition, feature_extractor):
self._dictionary = {}
self._transition = {}
self._match_transition = {}
self._model = None
View gist:9d60f71190092bae1265
redis.1 | _._
redis.1 | _.-``__ ''-._
redis.1 | _.-`` `. `_. ''-._ Redis 3.0.5 (00000000/0) 64 bit
redis.1 | .-`` .-```. ```\/ _.,_ ''-._
redis.1 | ( ' , .-` | `, ) Running in standalone mode
redis.1 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
redis.1 | | `-._ `._ / _.-' | PID: 85668
redis.1 | `-._ `-._ `-./ _.-' _.-'
redis.1 | |`-._`-._ `-.__.-' _.-'_.-'|
redis.1 | | `-._`-._ _.-'_.-' | http://redis.io
You can’t perform that action at this time.