Skip to content

Instantly share code, notes, and snippets.

🤓
//

Pipe Gutierrez Dudemullet

🤓
//
Block or report user

Report or block Dudemullet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View open-chrome-tabs-in-safari.scpt
tell application "Google Chrome"
set tab_list to every tab in the front window
repeat with the_tab in tab_list
set the_url to the URL of the_tab
tell application "Safari" to open location the_url
end repeat
end tell
@Dudemullet
Dudemullet / open-current-chrome-tab-in-safari.scpt
Last active May 13, 2019
Opens the active tab in the front most Google Chrome window in Safari.
View open-current-chrome-tab-in-safari.scpt
tell application "Google Chrome"
set current_tab to active tab in the front window
set the_url to the URL of current_tab
tell application "Safari" to open location the_url
tell current_tab to close
end tell
View marker clustering
componentWillReceiveProps(nextProps) {
if (nextProps.lastRequestedUserLocationAt > this.props.lastRequestedUserLocationAt) {
this.centerMapToUser(nextProps.currentLocation);
}
if (nextProps.lastUpdated > this.props.lastUpdated) {
const markers = this.createMarkersForLocations(nextProps);
if (markers && Object.keys(markers)) {
const clusters = {};
@Dudemullet
Dudemullet / data.json
Last active Aug 29, 2015
Peligro de inundacion
View data.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Dudemullet
Dudemullet / README.md
Created Jun 18, 2015
Peligro por inundacion por municipios
View README.md

Este mapa muestra el peligro de inundacion por municipio de Mexico. Los datos son brindado por la CENAPRED y los puedes encontrar en MXAbierto.

@Dudemullet
Dudemullet / data.json
Created Jun 16, 2015
Simulacion de municipios Mexicanos
View data.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Dudemullet
Dudemullet / data.json
Last active Aug 29, 2015
Sensores Pluviales en Cuenca de Mexico
View data.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View README.md

How to create the topojson map:

curl -o estados.zip http://mapserver.inegi.org.mx/MGN/mge2010v5_0.zip
curl -o  municipios.zip http://mapserver.inegi.org.mx/MGN/mgm2010v5_0.zip
unzip estados.zip 
unzip municipios.zip
ogr2ogr states.shp Entidades_2010_5.shp -t_srs "+proj=longlat +ellps=WGS84 +no_defs +towgs84=0,0,0"
ogr2ogr municipalities.shp Municipios_2010_5.shp -t_srs "+proj=longlat +ellps=WGS84 +no_defs +towgs84=0,0,0"
topojson -o mx_tj.json -s 1e-7 -q 1e5 states.shp municipalities.shp -p state_code=+CVE_ENT,state_name=NOM_ENT,mun_code=+CVE_MUN,mun_name=NOM_MUN
@Dudemullet
Dudemullet / .gitconfig
Last active Aug 29, 2015
Open any one of your remote git repos in a browser via cli. Great after pushing changes and wanting to create a pull request. Append this to your .gitconfig file
View .gitconfig
[alias]
web = "!f(){ url=$(git config --get remote.$1.url); git web--browse $url;}; f"
# useage
# git web origin - open your remote origin repo in the browser
You can’t perform that action at this time.