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
#!/bin/bash | |
# Daisydiff script based on https://gist.github.com/c4rl/5385704 for unix users | |
# Required folder structure: | |
# - this script | |
# - daisydiff folder | |
# - tmp folder | |
# CONFIGURATION | |
USERNAME=youruser |
Drupal 8 Stats as of May 24th, 2013 | |
`title_attributes` used in 12 templates or theme functions. | |
`content_attributes` used in 9 templates or theme functions and assumed existance in rdf. | |
`attributes` used in 35 templates or theme functions. | |
## Title Attributes | |
``` | |
core/modules/block/templates/block.html.twig: |
/** | |
* Prepares variables for HTML document templates. | |
* | |
* Default template: html.html.twig. | |
* | |
* @param array $variables | |
* An associative array containing: | |
* - page: A render element representing the page. | |
* | |
* @see system_elements() |
<?php | |
xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY); | |
register_shutdown_function(function () { | |
$namespace = 'sitename'; | |
$filename = '/tmp/' . uniqid() . '.' . $namespace . '.xhprof'; | |
file_put_contents($filename, serialize(xhprof_disable())); | |
}); |
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
A simple Ghostscript command to merge two PDFs in a single file is shown below:
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf -dBATCH 1.pdf 2.pdf
Install Ghostscript:
Type the command sudo apt-get install ghostscript
to download and install the ghostscript package and all of the packages it depends on.
alias homestead='function __homestead() { (cd ~/Documents/Code/Homestead && vagrant $*); unset -f __homestead; }; __homestead' | |
# Usage | |
homestead up | |
homestead halt | |
# etc... |
Map | Action |
---|---|
<F1> | Causes Netrw to issue help |
<cr> | Netrw will enter the directory or read the file |
<del> | Netrw will attempt to remove the file/directory |
- | Makes Netrw go up one directory |
a | Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide) |
c | Make browsing directory the current directory |
C | Setting the editing window |
d | Make a directory |
NOTE: This is outdated. Check the comments below for more up-to-date forks of this gist.
forked from https://gist.github.com/chetan/1827484 which is from early 2012 and contains outdated information.