Skip to content

Instantly share code, notes, and snippets.

View Dudemullet's full-sized avatar
🤓
//

Pipe Gutierrez Dudemullet

🤓
//
View GitHub Profile
@Dudemullet
Dudemullet / index.html
Created April 29, 2012 07:19
basic d3 example
<html>
<head>
<title>Simple D3 demo</title>
</head>
<body>
<div id="myDiv">
</div>
<script type="text/javascript" src="https://raw.github.com/mbostock/d3/master/d3.v2.js"></script>
<script type="text/javascript">
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 / open-current-chrome-tab-in-safari.scpt
Last active May 13, 2019 19:41
Opens the active tab in the front most Google Chrome window in Safari.
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
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