Skip to content

Instantly share code, notes, and snippets.

View chrisjacob's full-sized avatar

Chris Jacob chrisjacob

View GitHub Profile
@chrisjacob
chrisjacob / file1.txt
Created May 12, 2018 12:44
My first gist
Aren't gists great!
@chrisjacob
chrisjacob / example.html
Last active May 12, 2018 13:53
My first gist
<b>Bolded!!!!!!</b>
<h1>header</h1>
<p>hello<p>
{
"0": {
"link": "https:\/\/www.facebook.com\/Cavanbah\/",
"id": "128923005880",
"name": "Byron Bay",
"location": {
"city": "Byron Bay",
"country": "Australia",
"latitude": -28.642760546087,
console.log('mygist works!');
@chrisjacob
chrisjacob / Gemfile
Last active February 6, 2020 08:26
Simple guide to integrating Pages v1.0.0 with Rails v4.1.1
gem 'rails', '4.1.1'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
gem 'jquery-turbolinks'
# Gems for twitter LESS -> CSS and JS support
gem 'execjs'
<!DOCTYPE html>
<html data-ng-app="app" id="ng-app">
<head>
<meta charset="utf-8">
<title>Circuit</title>
<script data-require="angular.js@1.2.0-rc2" data-semver="1.2.0-rc2" src="http://code.angularjs.org/1.2.0-rc.2/angular.js"></script>
<script data-require="jquery@1.8.3" data-semver="1.8.3" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.js"></script>
<script src="circuit.js"></script>
<link rel="stylesheet" href="circuit.css" type="text/css">
<style id="jsbin-css">
A few short lines of text right here will make your visitors want to find out more about your business and what it can do for them. It doesn't take much. Just a line or two.A few short lines of text right here will make your visitors want to find out more about your business and what it can do for them. It doesn't take much. Just a line or two.A few short lines of text right here will make your visitors want to find out more about your business and what it can do for them. It doesn't take much. Just a line or two.A few short lines of text right here will make your visitors want to find out more about your business and what it can do for them. It doesn't take much. Just a line or two.A few short lines of text right here will make your visitors want to find out more about your business and what it can do for them. It doesn't take much. Just a line or two.A few short lines of text right here will make your visitors want to find out more about your business and what it can do for them. It doesn't take much. Just
@chrisjacob
chrisjacob / application.html.erb
Created August 11, 2013 13:18
Rails pretty print Request.env in your view template Thx: https://www.ruby-forum.com/topic/129732
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<%= yield %>
<%= debug(PP.pp(request.env, "")) if Rails.env.development? %>
</body>
</html>
// Built with IMPACT - impactjs.org
(function (window) {
"use strict";
Number.prototype.map = function (istart, istop, ostart, ostop) {
return ostart + (ostop - ostart) * ((this - istart) / (istop - istart));
};
Number.prototype.limit = function (min, max) {
return Math.min(max, Math.max(min, this));
};
Number.prototype.round = function (precision) {
@chrisjacob
chrisjacob / index.coffeescript
Created June 27, 2012 12:35
A web page created at CodePen.io
console.log document.getElementById "test"