Skip to content

Instantly share code, notes, and snippets.

wesruv wesruv

Block or report user

Report or block wesruv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:20a62ec7fb7d6165aa93ea3463724507
Warning: Failed prop type: The prop `body` is marked as required in `ArticlesLanding`, but its value is `undefined`.
in ArticlesLanding
in Connect(ArticlesLanding)
in div (at Default.js:33)
in div (at Default.js:31)
in Default
in Connect(Default) (at RouteResolver.js:45)
in RouteResolver
in Route
in withRouter(RouteResolver)
@wesruv
wesruv / script.js
Created May 13, 2017
Drupal 7 JS File Starter
View script.js
/**
* @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
Dupal 7 Resource friendly window resize listener
View window-resize.js
// 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:
View vscodeprefs.json
// 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": {
View gist:e87f2c670d64cf68967e7f02fc9bdc64
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
View gist:57b928ec9e1eb0b4f113032e50e6867e
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}
View gist:5395b6d0bf3b85d4960994a3d1a0889f
~/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 Oct 31, 2016
Clean CSS identifier from string
View function.js
// 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();
View console output
~/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
View gitdiff.txt
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'
You can’t perform that action at this time.