Command Line
pry -r ./config/app_init_file.rb- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb- load your rails into a pry session
Debugger
Command Line
pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb - load your rails into a pry sessionDebugger
| % FontAwesome (http://fortawesome.github.com/Font-Awesome/) bindings for (Xe)LaTeX | |
| % Author: Honza Ustohal <honza@egoistic.biz> | |
| % | |
| % 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: |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| #!/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 |
| <?php | |
| $countries = | |
| array( | |
| "AF" => "Afghanistan", | |
| "AL" => "Albania", | |
| "DZ" => "Algeria", | |
| "AS" => "American Samoa", | |
| "AD" => "Andorra", | |
| "AO" => "Angola", |
| 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> |
#Mac OS X
| [package] | |
| name = "testthat-cli" | |
| version = "0.1.0" | |
| edition = "2021" | |
| [dependencies] | |
| argh = "0.1.12" |
| /* ============================================ | |
| * bootstrap-infiniteScroll.js | |
| * ============================================ */ | |
| !function ($) { | |
| 'use strict'; | |
| var InfiniteScroll = function (el, options) { | |
| this.$element = $(el); | |
| this.$data = $(el).data(); | |
| this.$options = options; |
| library(xlsx) | |
| library(smatr) | |
| # get data, from publication Wright et al 2004. DOI: [10.1038/nature02403](http://doi.org/10.1038/nature02403) | |
| download.file("http://www.nature.com/nature/journal/v428/n6985/extref/nature02403-s2.xls", "wright-2004.xls") | |
| dat.Wright <- read.xlsx2("wright-2004.xls", sheetIndex=1, startRow=11, stringsAsFactors=FALSE, check.names=TRUE) | |
| ## Clean data | |
| dat.Wright <- dat.Wright[names(dat.Wright) != " "] # Drop blank columns | |
| for(v in c("log.LMA","log.LL")) |