Skip to content

Instantly share code, notes, and snippets.

@mackdoyle
mackdoyle / gist:6eb9dea4aef84765706d
Last active August 29, 2015 14:25 — forked from v-dh/gist:d1270d6fd303507438cd
Git on Yosemite keeps asking for remote username and password
Run following command line.
git config --global credential.helper osxkeychain
Then run your git command. Here is the link that helped me figure out. https://help.github.com/articles/caching-your-github-password-in-git/
$scope.pager = {
pageChange: function(pageNum) {
$scope.search(resultPager.get(pageNum));
},
next: function() {
this.pageChange(resultPager.next());
},
@mackdoyle
mackdoyle / es.sh
Last active August 29, 2015 14:17 — forked from Globegitter/es.sh
cd ~
##If you want to install OpenJDK
#sudo apt-get update
#sudo apt-get install openjdk-8-jre-headless -y
###Or if you want to install Oracle JDK, which seems to have slightly better performance
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
def self.circle_path(center, radius, complete_path = false)
# For increased accuracy, if your data is in a localized area, add the elevation in meters to r_e below:
r_e = 6378137.0
@@d2r ||= Math::PI/180
@@multipliers ||= begin
segments = 16
dRad = 2*Math::PI/segments
(segments + (complete_path ? 1 : 0)).times.map do |i|
rads = dRad*i
y = Math.sin(rads)