Skip to content

Instantly share code, notes, and snippets.

@AlexCortinas
AlexCortinas / readme.md
Created April 9, 2019 16:20
Leaflet with parcel (or similar I guess)
import { Icon } from "leaflet"
delete Icon.Default.prototype._getIconUrl
Icon.Default.mergeOptions({
  iconRetinaUrl: require("leaflet/dist/images/marker-icon-2x.png"),
  iconUrl: require("leaflet/dist/images/marker-icon.png"),
  shadowUrl: require("leaflet/dist/images/marker-shadow.png")
})
@AlexCortinas
AlexCortinas / clipboard
Created April 22, 2016 18:58
urxvt selection to clipboard
#! /usr/bin/perl
# urxvt selection to system clipboard
# Saw in: https://bbs.archlinux.org/viewtopic.php?id=42563
#
# Save it to /usr/lib64/urxvt/perl as clipboard
# In ~/.Xdefaults, enable it with:
# urxvt*perl-ext-common: default,matcher,clipboard
sub on_sel_grab {
@AlexCortinas
AlexCortinas / CORSFilter.java
Created January 13, 2016 17:41 — forked from zeroows/CORSFilter.java
To enable CORS support in Spring MVC 4 - Access-Control-Allow-Origin
package com.elm.mb.rest.filters;
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
@AlexCortinas
AlexCortinas / .gtkrc-eclipse
Created November 12, 2015 12:06 — forked from andrioli/.gtkrc-eclipse
Config to make Eclipse Juno icons and tabs look small and nice in Linux
# Create a new file in your home directory called .gtkrc-eclipse
# call eclipse with this command:
# Gtk2 forced:
# export SWT_GTK3=0
# env GTK2_RC_FILES=/usr/share/themes/<YourTheme>/gtk-2.0/gtkrc:/home/<YourUser>/.gtkrc-eclipse '/path_to_eclipse/eclipse'
# In your Eclipse directory find the file 'e4_default_gtk.css'
# In this file there's a CSS class: