Skip to content

Instantly share code, notes, and snippets.

//============================================================
// Annotations with line pointers
// @param y-position: num required
// @param x-position: num required
// @param box-width: num optional
// @param box-height: num optional
//============================================================
// Variables
// --------------------------------------
@mackdoyle
mackdoyle / learning-resources.md
Last active August 29, 2015 14:26
List of Videos and podcasts for the DevOps gifted
@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
{
"name": "my-project",
"version": "0.0.2",
"description": "",
"main": "Gruntfile.js",
"dependencies": {
"grunt": "^0.4.5",
"grunt-autoprefixer": "^0.7.3",
"grunt-bless": "^0.1.1",
"grunt-contrib-connect": "^0.8.0",
/**
* Grunt Task Configuratiion
* @Commands:
* grunt - Start the watcher
* grunt watch:sass - Watch for Sass changes only and compile.
*
* @Todo:
* 1. Convert to coffescript at some point
* 2. Modularize grunt file with load-grunt-config - http://www.html5rocks.com/en/tutorials/tooling/supercharging-your-gruntfile/
*/
@mackdoyle
mackdoyle / Gruntfile.js
Last active November 13, 2015 02:34
Grunt file that concats, minifies and writes include statements. Watches js, sass and jekyll.
/**
* Grunt Task Configuratiion
* @Commands:
* grunt - Start the watcher
* grunt sass - Compiles Sass to CSS
* grunt js - Concats js libs into a single file
* grunt uncss - Remove unused CSS while in development
* grunt dev - Builds files for development purposes
* grunt build - Builds files and makes them production ready
* grunt deploy - Runs build and deploys to a remote server
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)
@mackdoyle
mackdoyle / _baseline-it
Last active January 2, 2016 08:29
Mixin that provides a baseline grid (from basehold.it) to help achieve vertical rhythm when typesetting.
//==========================================================================
// Baseline It
// Adds visible lines to the background for typography positioning.
//
// 1. Pass the height you want the grid and the RGB color value of the grid lines.
// 2. An optional offset value can be passed to compensate for padding or margins
// that effect the starting point.
// 3. An option value to hide the grid by default can be passed. Click and hold
// anywhere within the element to hide/show the grid.
//