Skip to content

Instantly share code, notes, and snippets.

View emjayess's full-sized avatar
💭
🪞 mirroring repos from gitlab

Matthew J. Sorenson emjayess

💭
🪞 mirroring repos from gitlab
View GitHub Profile
@emjayess
emjayess / gist:95555934ebf1ed6a8162
Created October 28, 2014 05:36
npm search express
This file has been truncated, but you can view the full file.
emjayess$ npm search express
npm info it worked if it ends with ok
npm verb cli [ 'node', '/usr/local/bin/npm', 'search', 'express' ]
npm info using npm@2.1.6
npm info using node@v0.10.33
npm verb node symlink /usr/local/bin/node
npm verb mapToRegistry name -/all
npm verb mapToRegistry uri https://registry.npmjs.org/-/all
npm info get /Users/emjayess/.npm/registry.npmjs.org/-/all/.cache.json
npm WARN Building the local index for the first time, please be patient
@emjayess
emjayess / drupal-cache-tables
Last active August 29, 2015 14:05
MySQL statement to show tables with 'cache' in the table name
#mysql> show tables from `mydrupaldb` where `tables_in_mydrupaldb` like '%cache%';
mysql> show tables like '%cache%'; # this works, for just a single pattern match
+----------------------------------+
| Tables_in_mydrupaldb |
+----------------------------------+
| cache |
| cache_admin_menu |
| cache_apachesolr |
| cache_block |
| cache_bootstrap |
@emjayess
emjayess / drush-perm-grant.sh
Created October 31, 2013 07:42
Use drush to lock a Drupal site effectively into a read-only state. Have used this as a means to leave a site's content online and available while preparing and even upgrading.
#!/bin/bash
# clear the lock file
rm /path/to/drupal/site/lock
# grant (back) roles and permissions that are capable of content 'writes'
drush @site perm-revoke --roles="contributor" --permissions="post comments,create answer content,create feed content"
$ curl http://127.0.0.1:5984/
{"couchdb":"Welcome","uuid":"41cdbb1ba7c86925d439edaf67369888","version":"1.3.1","vendor":{"version":"1.3.1-1","name":"Homebrew"}}
@emjayess
emjayess / step-1-which-versions-grails
Last active December 19, 2015 14:09
Managing Grails versions using homebrew package manager for Mac OS X
# find the versions available in homebrew
# optionally
brew up
## ... homebrew refreshes all package information
brew versions grails
## 2.2.2 git checkout a3fdc1f /usr/local/Library/Formula/grails.rb
## 2.2.1 git checkout aa5c440 /usr/local/Library/Formula/grails.rb
## 2.2.0 git checkout 5c5b964 /usr/local/Library/Formula/grails.rb
@emjayess
emjayess / mysql-table-table-prefix-nix.sh
Created April 28, 2013 20:56
drop mysql tables with the given table prefix 'mytableprefix_'
mysql --database=mydb --host=my.host --user=myuser -e "show tables" -s |
egrep "^mytableprefix_" |
xargs -I "@@" echo mysql --database=mydb --host=my.host --user=myuser -e "DROP TABLE @@";
@emjayess
emjayess / gist:5463489
Last active May 22, 2019 17:09
Permission denied (public key) even tho my deploy key is evidently recognized...

Permission denied (public key) even tho my deploy key is evidently recognized...

ubuntu@news:~$ ssh -T git@bitbucket.org
Warning: Permanently added the RSA host key for IP address '207.223.240.182' to the list of known hosts.
conq: authenticated via a deploy key.

You can use git or hg to connect to Bitbucket. Shell access is disabled.
ubuntu@news:~$ sudo git clone git@bitbucket.org:example/example.git /var/www/sites/news
Cloning into '/var/www/sites/news'...
@emjayess
emjayess / pouchdb-server.sh
Created March 13, 2013 00:21
PouchDB Server for NodeJS!
npm install pouchdb-server && npm start pouchdb-server
curl http://127.0.0.1:5984
{ "pouchdb-server": "Welcome!", "version": "0.1.0" }
# <3
@emjayess
emjayess / ericafail
Last active December 14, 2015 15:09
erica push failing, exiting...
macaroni:empress emjayess$ erica create-app appid=empress
==> empress (create-app)
Writing empress/_id
Writing empress/language
Writing empress/.couchapprc
Writing empress/views/by_type/map.js
macaroni:empress emjayess$ erica push empress
==> empress (push)
ERROR: push failed while processing /Users/emjayess/Sources/couchapp_star/empress: {'EXIT',{undef,[{jiffy,encode,
[{[{<<"_id">>,<<"_design/empress">>},
@emjayess
emjayess / config.log
Last active December 14, 2015 14:29
Error: couchdb did not build OSX Lion w/brew brew 0.9.4 (XCode was up to date, including CLI tools)
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Apache CouchDB configure 1.2.1, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ ./configure --prefix=/usr/local/Cellar/couchdb/1.2.1 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc --with-erlang=/usr/local/lib/erlang/usr/include --with-js-include=/usr/local/include/js --with-js-lib=/usr/local/lib
## --------- ##
## Platform. ##