#Mac OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$countries = | |
array( | |
"AF" => "Afghanistan", | |
"AL" => "Albania", | |
"DZ" => "Algeria", | |
"AS" => "American Samoa", | |
"AD" => "Andorra", | |
"AO" => "Angola", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is a simple jQuery plugin to make a table header fixed on top when window is scrolled. | |
Using the code from twitter bootstrap documentation page, this code is customized for table header. | |
Create the table with following layout - | |
<table class="table-fixed-header"> | |
<thead class="header"> | |
<tr> | |
<th>Column 1</th> | |
<th>Column 2</th> | |
<th>Column 3</th> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% FontAwesome (http://fortawesome.github.com/Font-Awesome/) bindings for (Xe)LaTeX | |
% Author: Honza Ustohal <[email protected]> | |
% | |
% Translation of FontAwesome's private range characters into XeTeX symbols. All icons are camel-cased and prefixed with 'fa', i.e. what was .icon-align-center the CSS version of FontAwesome becomes \faAlignCenter | |
% This might be reworked into a full blown package in the near future | |
% | |
% Prerequisite: | |
% XeLaTeX, FontAwesome installed as a system font accessible by XeLaTeX | |
% | |
% Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shinyServer(function(input, output) { | |
output$filetable <- reactiveTable(function() { | |
if (is.null(input$files)) { | |
# User has not uploaded a file yet | |
return(NULL) | |
} | |
input$files | |
}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################################### | |
# | |
# Altmetrics about Aalto University publications | |
# 2007-2012 with a DOI | |
# | |
# Altmetrics data provided by altmetric.com | |
# Web of Science data provided by Thomson Reuters | |
# | |
########################################################## | |
library(rAltmetric) |
- bootstrap style alert of where to go for original blog post instead of the defaultl theme thing
- make categories/tags imports actually work
- Add more instructions on the add blog page on what is appropriate
- After we get permanent URL, add in Disqus plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(shiny) | |
require(hwriter) | |
dat <- read.csv(textConnection("homeTeam, homeScore, awayTeam, awayScore | |
Boston, 3, NY Rangers, 4 | |
Chicago, 0, Detroit, 2 | |
San Jose, 0, Los Angeles, 3"), header = TRUE) | |
shinyServer(function(input, output){ | |
output$mytable <- renderText({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"election_id": "md-2012-11-06-general", | |
"division": "ocd-division/country:us/state:md", | |
"office_name": "President", | |
"office_district": "", | |
"results": [{"given_name": "Barack", "additional_name": "", "last_name": "Obama", "suffix": "", "name": "Barack Obama", "other_names": [], "party": "DEM", "votes": 1677844, "percent": 61.97, "winner": true}, | |
{"given_name": "Mitt", "additional_name": "", "last_name": "Romney", "suffix": "", "name": "Mitt Romney", "other_names": [], "party": "REP", "votes":971869, "percent": 35.9, "winner": false }, | |
{"given_name": "Gary", "additional_name": "", "last_name": "Johnson", "suffix": "", "name": "Gary Johnson", "other_names": [], "party": "LIB", "votes":30195, "percent": 1.12, "winner": false }, | |
{"given_name": "Jill", "additional_name": "", "last_name": "Stein", "suffix": "", "name": "Jill Stein", "other_names": [], "party": "GRE", "votes":17110, "percent": 0.63, "winner": false }, | |
{"given_name": "", "additional_name": "", "last_name": "Other Write-Ins", "suff |
OlderNewer