Skip to content

Instantly share code, notes, and snippets.

View wesruv's full-sized avatar
🤔

wesruv wesruv

🤔
View GitHub Profile
@wesruv
wesruv / script.js
Created May 13, 2017 18:37
Drupal 7 JS File Starter
/**
* @file
* A JavaScript file that does stuff.
*/
// JavaScript should be made compatible with libraries other than jQuery by
// wrapping it with an "anonymous closure". See:
// - https://drupal.org/node/1446420
// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth
(function ($) {
@wesruv
wesruv / window-resize.js
Created May 13, 2017 18:32
Dupal 7 Resource friendly window resize listener
// Make sure we have the Drupal object, or make one
var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'locale': {} };
/**
* Resource conscious resize handler
*
* This was grabbed from: https://developer.mozilla.org/en-US/docs/Web/Events/resize
* @param {function} Function that should be run on resize
*
* Example:
// Place your settings in this file to overwrite the default settings
{
"editor.fontSize": 19,
"editor.lineHeight": 29,
"editor.tabSize": "2",
"editor.insertSpaces": "true",
"editor.renderWhitespace": "all",
"files.eol": "\n",
"editor.renderIndentGuides": true,
"files.exclude": {
elasticsearch_1 | ... 5 more
elasticsearch_1 | Caused by: java.nio.file.FileSystemException: /usr/share/elasticsearch/data/elasticsearch/nodes/0/indices/lullabot/3/translog/translog.ckp -> /usr/share/elasticsearch/data/elasticsearch/nodes/0/indices/lullabot/3/translog/translog-1158164249911420948.tlog: No space left on device
elasticsearch_1 | at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
elasticsearch_1 | at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
elasticsearch_1 | at sun.nio.fs.UnixCopyFile.copyFile(UnixCopyFile.java:253)
elasticsearch_1 | at sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:581)
elasticsearch_1 | at sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:253)
elasticsearch_1 | at java.nio.file.Files.copy(Files.java:1274)
elasticsearch_1 | at org.elasticsearch.index.translog.Translog.recoverFromFiles(Translog.java:344)
elasticsearch_1 | at org.elasticsearch.index.tran
root@c59867f065b6:/var/www/html# make clean && make install
curl -XDELETE 'http://couchdb:5984/lullabot/' \
&& curl -XDELETE 'http://couchdb:5984/lullabot_preview/' \
&& curl -XDELETE 'http://elasticsearch:9200/lullabot/' \
&& echo "DROP database IF EXISTS lullabot" | mysql -u root -proot -h mysql \
&& chmod 755 docroot/sites/default \
&& chmod 755 docroot/sites/default/settings.php \
&& rm -f settings.php \
&& echo "\n"
{"ok":true}
~/lullabot/lullabot.com-experimental (master)
$ yarn run start:dev
yarn run v0.17.10
$ yarn run clean && yarn upgrade && yarn run build && npm-run-all --parallel reload build:server:watch build:client:watch build:styleguide:watch start:nodemon
yarn run v0.17.10
$ find dist -type f -not -name '.gitignore' -print0 | xargs -0 rm --
rm: missing operand
Try 'rm --help' for more information.
error Command failed with exit code 123.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@wesruv
wesruv / function.js
Last active October 31, 2016 18:18
Clean CSS identifier from string
// In a perfect world, you'd never have to do this. Wish I lived in a perfect world.
/**
* Convert a string to a usable class name
* @param {string} stringToConvert String of text
* @return {string} Usable class name
*/
function convertStringToClassName(stringToConvert) {
if (typeof stringToConvert === 'string') {
return stringToConvert.trim().replace(/[\s-_]+/g, '-').replace(/[^\w-]|^-|-$/g, '').replace(/-+(?=-)/, '').toLowerCase();
~/lullabot/lullabot.com-www (1903-remove-abs-paths)
$ git st
## 1903-remove-abs-paths...origin/1903-remove-abs-paths
~/lullabot/lullabot.com-www (1903-remove-abs-paths)
$ npm i
> fsevents@1.0.14 install /home/wesruv/lullabot/lullabot.com-www/node_modules/fsevents
> node-pre-gyp install --fallback-to-build
This file has been truncated, but you can view the full file.
diff --git a/node_modules/acorn-jsx/node_modules/acorn/.travis.yml b/node_modules/acorn-jsx/node_modules/acorn/.travis.yml
index f50c379..d9ee88b 100644
--- a/node_modules/acorn-jsx/node_modules/acorn/.travis.yml
+++ b/node_modules/acorn-jsx/node_modules/acorn/.travis.yml
@@ -1,6 +1,7 @@
language: node_js
sudo: false
node_js:
- - '0.10'
{
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
"caret_extra_bottom": 2,
"caret_extra_top": 2,
"caret_extra_width": 3,
"caret_style": "phase",
"color_scheme": "Packages/User/SublimeLinter/Oceanic Next (SL).tmTheme",
"default_line_ending": "unix",
"draw_white_space": "all",