Skip to content

Instantly share code, notes, and snippets.

View reallistic's full-sized avatar

Michael reallistic

View GitHub Profile
@reallistic
reallistic / prettyprintgistorgithub.md
Last active September 25, 2019 21:44 — forked from mash/prettyprintgist.md
Bookmarklet to pretty print Gist and Github pages without the usual page chrome, just content. Handy for Markdown document printing.

Pretty print bookmarklet helper for Gist pages

Create a new bookmark somewhere handy in your browser with the following URL:

javascript:var el=document.createElement('style');el.media='print';el.innerHTML='#header,.pagehead.repohead,.gist-description.container,.file-box .meta,#comments,.js-comment-form,.gist-header,.file-header,.gisthead,#footer,div.commit-tease,div.file-navigation{display:none;}.file-box{border:0!important;}';document.getElementsByTagName('head')[0].appendChild(el);alert('Now, cmd+p to print');
  • Navigate to your Gist of choice
  • Hit the bookmarklet
  • Now print
@reallistic
reallistic / todo.jsx
Last active June 26, 2017 21:57 — forked from caike/todo.jsx
Simple Todo app demo using React + ES6
var React = require("react");
var request = require("requests");
var allItems = []
allItems.push("Buy ingredients for Crock Pot");
allItems.push("Pick up chair at IKEA");
allItems.push("Go see mom");
class TodoList extends React.Component {
constructor(props){
@reallistic
reallistic / install-redis.sh
Last active April 20, 2017 21:37 — forked from khelll/install-redis.sh
Installing Redis on Amazon Linux
#!/bin/bash
###############################################
# To use:
# chmod +x install-redis.sh
# ./install-redis.sh
###############################################
version=3.2.8
echo "*****************************************"
echo " 1. Prerequisites: Install updates, set time zones, install GCC and make"