Skip to content

Instantly share code, notes, and snippets.

View sample.txt
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
View index.html
<!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">
View mygist.js
console.log('mygist works!');
@chrisjacob
chrisjacob / charCode-encode-string.js
Created Jun 1, 2010
string2charCodeString encodes the entire string to charCode values. idEncode converts a string into a valid HTML id attribute [A-Za-z0-9_-]. Useful for producing readable window.location.hash fragments
View charCode-encode-string.js
// Example:
// http://github.com/chris/project123/blob/master/new_mailer/install-file.rb
// 104-116-116-112-58-47-47-103-105-116-104-117-98-46-99-111-109-47-99-104-114-105-115-47-112-114-111-106-101-99-116-49-50-51-47-98-108-111-98-47-109-97-115-116-101-114-47-110-101-119-95-109-97-105-108-101-114-47-105-110-115-116-97-108-108-45-102-105-108-101-46-114-98
function string2charCodeString (s){
if(typeof(s) != 'string') return false;
a = [];
f = s.length;
for (i = 0; i<f; i++) {
a[i] = s.charCodeAt(i);
View handy_css_debugging_snippet.css
/* Handy CSS Debugging Snippet
* { outline: 2px dotted red }
* * { outline: 2px dotted green }
* * * { outline: 2px dotted orange }
* * * * { outline: 2px dotted blue }
* * * * * { outline: 1px solid red }
* * * * * * { outline: 1px solid green }
* * * * * * * { outline: 1px solid orange }
* * * * * * * * { outline: 1px solid blue }
*/
View github_oauth_busy_developer_guide.md

GitHub OAuth Busy Developer's Guide

This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at Develop.GitHub.com.

OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.

Web Application Flow

  • Redirect to this link to request GitHub access:
@chrisjacob
chrisjacob / bar.txt
Created Nov 18, 2010
Testing public gist access
View fiddle.css
body {
font-family: Helvetica, Verdana
}
p {
padding: 7px 10px;
}
#demo {
border: 1px solid #999;
}
@chrisjacob
chrisjacob / fiddle.html
Created Jan 12, 2011
XHTML5 using .xhtml and .html extensions
View fiddle.html
<!DOCTYPE html>
<!-- See http://mathiasbynens.be/notes/xhtml5 for more info. -->
<!-- This document is served as application/xhtml+xml to trigger HTML5 in XML serialization mode. -->
<!-- The DOCTYPE is optional in XML mode, but if you don't want to omit it, it needs to be uppercase. -->
<!-- Also, you need to add an XML namespace to the root element. -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>XHTML5, or HTML5 in XML serialization mode</title>
</head>