Skip to content

Instantly share code, notes, and snippets.

View ghelobytes's full-sized avatar

Angelo Arboleda ghelobytes

View GitHub Profile
@ghelobytes
ghelobytes / Gemfile
Created July 3, 2022 07:10 — forked from bosskovic/Gemfile
Devise as authentication solution for rails API
gem 'devise', '3.2.4'
gem 'simple_token_authentication', '1.5.0'
@ghelobytes
ghelobytes / get_job_status.sh
Created August 3, 2018 19:39 — forked from arturmkrtchyan/get_job_status.sh
Apache Spark Hidden REST API
curl http://spark-cluster-ip:6066/v1/submissions/status/driver-20151008145126-0000
var searchBox = new google.maps.places.SearchBox(document.getElementById('searchinput'));
google.maps.event.addListener(searchBox, 'places_changed', function() {
var place = searchBox.getPlaces()[0];
if (!place.geometry) return;
if (place.geometry.viewport) {
map.fitBounds(place.geometry.viewport);
} else {
from cloudsearch import connect_cloudsearch, get_document_service
endpoint = 'paste your doc service endpoint here'
service = get_document_service(endpoint=endpoint) # Get a new instance of cloudsearch.DocumentServiceConnection
# Presumably get some users from your db of choice.
users = [
{
'id': 1,
@ghelobytes
ghelobytes / Issues.md
Last active August 29, 2015 14:16 — forked from rclark/Issues.md

There are a bunch of reasons why this is convoluted, mostly in building the URL to make the request:

  1. You have to rely on an AJAX request, this example uses jQuery
  2. To make a GetFeatureInfo request, you must provide a BBOX for a image, and the pixel coordinates for the part of the image that you want info from. A couple of squirrely lines of Leaflet code can give you that.
  3. Output formats. The info_format parameter in the request. We don't know a priori which will be supported by a WMS that we might make a request to. See Geoserver's docs for what formats are available from Geoserver. That won't be the same from WMS to WMS, however.
  4. WMS services return XML docs when there's a mistake in the request or in processing. This sends an HTTP 200, which jQuery doesn't think is an error.
from cloudsearch import connect_cloudsearch, get_document_service
endpoint = 'paste your doc service endpoint here'
service = get_document_service(endpoint=endpoint) # Get a new instance of cloudsearch.DocumentServiceConnection
# Presumably get some users from your db of choice.
users = [
{
'id': 1,
<!DOCTYPE html>
<html>
<head>
<title>Map Panel</title>
<!-- ExtJS -->
<script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/4.2.1/examples/shared/include-ext.js"></script>
<script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/4.2.1/examples/shared/options-toolbar.js"></script>
<link rel="stylesheet" type="text/css" href="http://cdn.sencha.com/ext/gpl/4.2.1/examples/shared/example.css" />
<!-- Local OpenLayers 3 stylesheet -->
<link href='ol.css' rel="stylesheet">
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);

Project

Description: What does this project do and who does it serve?

Project Setup

How do I, as a developer, start working on the project?

  1. What dependencies does it have (where are they expressed) and how do I install them?
  2. How can I see the project working before I change anything?
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlServerCe;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading;