This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# About: Bash script to create new Jekyll posts | |
# Author: @AamnahAkram | |
# URL: https://gist.github.com/aamnah/f89fca7906f66f6f6a12 | |
# Description: This is a more advanced version of the script which can | |
# - take options | |
# - has color coded status messages | |
# - improved code | |
# - lowercase permalinks | |
# - usage message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function printMap() { | |
var currentLoc = map.getCenter(); | |
var currentZoom = map.getZoom(); | |
return newWindow = window.open( | |
"https://api.mapbox.com/styles/v1/mapbox/outdoors-v10/static/" + currentLoc.lng + "," + currentLoc.lat + "," + currentZoom + ",0,0/600x600?access_token=<API_KEY>", | |
"_blank", | |
"toolbar=yes,width=750,height=750" | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doGeolocation() { | |
if (navigator.geolocation) { | |
navigator.geolocation.getCurrentPosition(positionSuccess, positionError); | |
} else { | |
positionError(-1); | |
} | |
} | |
function positionError(err) { | |
var msg; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body, #map-canvas | |
{ | |
width:100%; | |
height:100%; | |
min-height:100%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myLatLng = [-120.5, 44.14]; | |
zoom = 7; | |
mapboxgl.accessToken = 'API_KEY'; //provided by mapbox | |
map = new mapboxgl.Map({ | |
container: 'map-canvas', // container id | |
style: 'mapbox://styles/mapbox/outdoors-v9', // stylesheet location | |
center: myLatLng, // starting position [lng, lat] | |
zoom: zoom // starting zoom | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getParameterByName(name) { | |
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); | |
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), | |
results = regex.exec(location.search); | |
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Android SDK | |
export PATH=$PATH:/Users/jwegner/Library/Developer/Xamarin/android-sdk-mac_x86/platform-tools:/Users/jwegner/Library/Developer/Xamarin/android-sdk-mac_x86/tools | |
### Postgres | |
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.3/bin | |
alias ll='ls -lahG' | |
alias gitlog='git log --pretty=format:"%h %s" --graph' | |
alias code='cd /Users/jwegner/jesse/code; ls' | |
alias trimble='cd /Users/jwegner/jesse/trimble; ls' | |
alias pyserver='python -m SimpleHTTPServer ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DS_Store | |
log | |
.powenv | |
*.komodoproject | |
.komodotools | |
bin | |
bin/*.* | |
lib | |
lib/*.* | |
include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax: glob | |
.DS_Store | |
log | |
.powenv | |
*.komodoproject | |
.komodotools | |
bin | |
bin/*.* | |
lib | |
lib/*.* |
NewerOlder