Skip to content

Instantly share code, notes, and snippets.

View oskosk's full-sized avatar

Osk oskosk

  • Automattic
  • Buenos Aires, Argentina
View GitHub Profile
@oskosk
oskosk / argenmap.malvinas_sobre_roadmap.js
Last active December 19, 2015 22:18
función para superponer imagen de las Islas Malvinas sobre google roadmap con argenmap
function argenmap_superponerIslasMalvinasSobreGoogleRoadmap()
{
var gmap = $('#map').data('gmap');
if (! window.oldmap) {
var boundaries = new google.maps.LatLngBounds(
new google.maps.LatLng(-52.449314, -61.391602),
new google.maps.LatLng(-50.965346, -56.414795)
);
oldmap = new google.maps.GroundOverlay('//www.desarrollosocial.gov.ar/Images/MalvinasArgentinas2.png',boundaries);
}
@oskosk
oskosk / argenmap.agregar_roadmap.js
Created July 18, 2013 00:56
función para agregar la capa googleroadmap a un mapa normal de argenmap.jquery v1. (que por default muestra solo la capa base argenmap y como alternativa, el mapa SATELLITE de Google Maps API con la capa transparente de argenmap y no con los topónimos de Google
function argenmap_agregarGoogleRoadmap()
{
var gmap = $('#map').data('gmap');
gmap.mapTypeControlOptions.mapTypeIds.push('roadmap');
gmap.setOptions({
mapTypeControlOptions: {
mapTypeIds: gmap.mapTypeControlOptions.mapTypeIds,
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
}
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
<template>
<style>
#speech_mic {
left: 450px;
top: 280px;
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Basic Template</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
<link rel="stylesheet" href="style.css">

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@oskosk
oskosk / example.js
Last active August 29, 2015 14:10
small module for getting WMS capabilities with jQuery
var capabilitiesUrl = "/geoserver/wms?request=getcapabilities&service=wms&version=1.1.1";
wms.capabilities(capabilitiesUrl, function(capabilities) {
console.log(wms.layerBounds(capabilities, "opengeo:EL_NILO_LOTE_1"))
});
@oskosk
oskosk / gist:85764b31f9dc4d7127f3
Created January 5, 2015 19:16
user config for javascript-beautify plugin for Sublime Text 3
{
"indent_size": 2,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"jslint_happy": false,
"brace_style": "collapse",
"keep_array_indentation": false,
@oskosk
oskosk / Shovel apps jshintrc for nodejs
Last active August 29, 2015 14:13
shovelapps jshintrc for the browser
{
"node": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"eqeqeq": true,
"eqnull": true,
"immed": true,
"indent": 2,
"latedef": "nofunc",