Skip to content

Instantly share code, notes, and snippets.

View justinph's full-sized avatar

Justin Heideman justinph

View GitHub Profile
@MarcoEidinger
MarcoEidinger / TableWithCodeTipsAndExamples.md
Last active March 12, 2024 17:21
Master GitHub markdown tables with code blocks

Master GitHub markdown tables with code blocks

  1. Use HTML tags to define the table to get the best layout result
  2. Use either backticks (```) or the HTML pre element with attribute lang
  3. Keep a blank line before and after a code block for correct formatting and syntax highlighting

Good

Example: nice looking table to show HTTP Responses

@wtfil
wtfil / index.js
Last active July 7, 2017 16:55
injection of redux's dispatch in react-router's onEnter hook
/*
* common react, redux staff here
*/
import {Router, createRoutes} from 'react-router';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import rawRoutes from './routes';
import store from './store';
function mixStoreToRoutes(routes) {
return routes && routes.map(route => ({
@swans-one
swans-one / playlist-analysis.R
Created August 31, 2013 16:58
Analysis of The Current's playlist data.
# Filename: playlist-analysis.R
library(data.table)
library(ggplot2)
library(xtable)
df <- read.csv("current_playlist_2006-2012.csv", stringsAsFactors = FALSE)
df.unclean <- df # so we can revert without re-reading during development
# What form the data is in:
@iStefo
iStefo / ember-meta.js
Created April 29, 2013 13:14
Ember-Meta module. See first comment for usage etc.!
// include this code in your application, you don't need to call any initialization manually!
Ember.Application.initializer({
name: "meta",
initialize: function(container, application) {
// helper function to get tag from dom
var _getTag = function(tagname, property, value) {
var tags = document.head.getElementsByTagName(tagname),
tag,
@skyrocknroll
skyrocknroll / screenshot.py
Last active January 6, 2023 11:01
screenshot linux automation , xdotool , xwininfo
#!/usr/bin/python
import subprocess
subprocess.call(["sh","./screenshot.sh","11","www.canvera.com"])
@benjchristensen
benjchristensen / index.html
Created May 2, 2012 19:37
Line Graph with Dual-scaled Axes using SVG and d3.js
<html>
<head>
<title>Line Graph with Dual-scaled Axes using SVG and d3.js</title>
<script src="http://mbostock.github.com/d3/d3.v2.js"></script>
<style>
/* tell the SVG path to be a thin blue line without any area fill */
path {
stroke-width: 1;
fill: none;
}
@kevinSuttle
kevinSuttle / meta-tags.md
Last active March 22, 2024 09:36 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@loonies
loonies / 1_phpunit-api.md
Last active January 19, 2024 07:34
PHPUnit Cheat Sheet

PHPUnit API reference

  • version 3.6

TODO

Check those constraints:

$this-&gt;anything()