Skip to content

Instantly share code, notes, and snippets.

# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
const u = require('umbrellajs').u;
u.prototype.absTop = function() {
return this.first().getBoundingClientRect().top + window.pageYOffset;
}
u.prototype.absBottom = function() {
return this.first().getBoundingClientRect().bottom + window.pageYOffset;
}
@dallinskinner
dallinskinner / search_blocks.sh
Last active July 7, 2017 20:25
Search content of blocks
#!/bin/bash
ssh vm 'mysql '$1'_drupal -e "SELECT bid, info, CONCAT('\''https://dallin.office.lucid'$1'.com/pages/admin/structure/block/manage/block/'\'', bid, '\''/configure'\'') as url FROM block_custom WHERE body LIKE '\''%'$2'%'\''\G"'