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 / getinsights.zsh
Last active May 26, 2019 00:24
'getinsights' shortcut for @nunomaduro's phpinsights
# added to ohmyzsh custom aliases; for laravel / artisan
getinsights() {
composer require nunomaduro/phpinsights --dev
php artisan vendor:publish --provider="NunoMaduro\PhpInsights\Application\Adapters\Laravel\InsightsServiceProvider"
php artisan insights
}
@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 / keybase.md
Created April 5, 2018 23:08
keybase claimant

Keybase proof

I hereby claim:

  • I am emjayess on github.
  • I am mattso (https://keybase.io/mattso) on keybase.
  • I have a public key ASAbqQc40ZibE2hPbrsmrGPfIiIxd1EfQL2zIHSr80PsEgo

To claim this, I am signing this object:

@emjayess
emjayess / goog-query-args
Created November 30, 2012 05:33
google search's query string args
https://www.google.com/webhp
?sourceid=chrome-instant
&ion=1
&ie=UTF-8#hl=en
&safe=off
&tbo=d
&sclient=psy-ab
&q=here%20lies%20a%20fucking%20search%20query
&oq=
&gs_l=
@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 / 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">>},