Skip to content

Instantly share code, notes, and snippets.

View tansaku's full-sized avatar

Sam Joseph tansaku

View GitHub Profile
@tansaku
tansaku / confident_ruby_notes.md
Last active August 12, 2017 09:03
Thoughts we had while mobbing on Avdi Grimm's confident Ruby

3.8: Define conversion functions

We were wondering if this might be a reasonable intermediate approach:

def Point(point_or_x, y=:y_not_set_in_draw_point)
  point_or_x.is_a?(Integer) ? Point.new(point_or_x, y) : point_or_x
end
@tansaku
tansaku / post-elixir-mob-notes.md
Created August 1, 2017 02:34
post elixir mob notes
@tansaku
tansaku / output.txt
Created July 25, 2017 07:40
letsencrypt renewal for asyncvoter
[tansaku@Samuels-MBP:~/Documents/Github/heroku/async-voter-production (master)]$
→ ssh dokku@agileventures.eastus.cloudapp.azure.com letsencrypt asyncvoter-staging
=====> Let's Encrypt asyncvoter-staging
-----> Updating letsencrypt docker image...
latest: Pulling from dokkupaas/letsencrypt-simp_le
Digest: sha256:398e9173f8e9662df66cb6d0dfa6c6ac07f1e3d65b7994177d487d36eb9b10be
Status: Image is up to date for dokkupaas/letsencrypt-simp_le:latest
done updating
-----> Enabling ACME proxy for asyncvoter-staging...
-----> Getting letsencrypt certificate for asyncvoter-staging...
@tansaku
tansaku / output.txt
Created July 4, 2017 16:32
stuck getting automysqlbackup running on bitnami azure
bitnami@bitnami-mediawiki-74f7:~$ automysqlbackup
/opt/bitnami/mysql/bin/mysql.bin: unknown variable 'defaults-file=/etc/mysql/debian.cnf'
mkdir: cannot create directory ‘/var/lib/automysqlbackup/daily’: Permission denied
mkdir: cannot create directory ‘/var/lib/automysqlbackup/weekly’: Permission denied
mkdir: cannot create directory ‘/var/lib/automysqlbackup/monthly’: Permission denied
touch: cannot touch ‘/var/lib/automysqlbackup/localhost-392151700.log’: Permission denied
/usr/sbin/automysqlbackup: line 411: /var/lib/automysqlbackup/localhost-392151700.log: Permission denied
touch: cannot touch ‘/var/lib/automysqlbackup/ERRORS_localhost-398686400.log’: Permission denied
/usr/sbin/automysqlbackup: line 415: /var/lib/automysqlbackup/ERRORS_localhost-398686400.log: Permission denied
======================================================================
@tansaku
tansaku / stats.txt
Created June 5, 2017 16:34
output from running the github commit update on WSO
This file has been truncated, but you can view the full file.
Completed 200 OK in 536ms (Views: 303.0ms | ActiveRecord: 35.1ms)
user: tansaku
GET /users/michael-c
USE eager loading detected
CommitCount => [:project]
Add to your finder: :includes => [:project]
Call stack
/Users/tansaku/Documents/GitHub/AgileVentures/WebsiteOne/app/presenters/users/user_presenter.rb:24:in `block in contributions'
/Users/tansaku/Documents/GitHub/AgileVentures/WebsiteOne/app/presenters/users/user_presenter.rb:23:in `contributions'
/Users/tansaku/Documents/GitHub/AgileVentures/WebsiteOne/app/presenters/users/user_presenter.rb:19:in `contributed?'
@tansaku
tansaku / errors.txt
Last active May 17, 2017 19:32
lines that gave syntax errrors when loading Visual Editor
div.querySelectorAll("*,:x")
matches.call(div,"[s!='']:x")
push.apply(results,newContext.querySelectorAll(newSelector
The above always cause syntax errors even when the VE loads
These below also occur when the VE fails with moderated edits pending:
@tansaku
tansaku / ie11-ve-fail.txt
Last active May 17, 2017 08:31
ie11-ve-fail
DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337File: index.php
HTML1300: Navigation occurred.File: index.php
DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337File: index.php
SEC7115: :visited and :link styles can only differ by color. Some styles were not applied to :visited.File: index.php
Exception in load-callback in module ext.cite.visualEditor:SyntaxError SyntaxError   "SyntaxError"   {      [functions]: ,      __proto__: { },      ABORT_ERR: 20,      code: 12,      constructor: { },      DATA_CLONE_ERR: 25,      DOMSTRING_SIZE_ERR: 2,      HIERARCHY_REQUEST_ERR: 3,      INDEX_SIZE_ERR: 1,      INUSE_ATTRIBUTE_ERR: 10,      INVALID_ACCESS_ERR: 15,      INVALID_CHARACTER_ERR: 5,      INVALID_MODIFICATION_ERR: 13,      INVALID_NODE_TYPE_ERR: 24,      INVALID_STATE_ERR: 11,      message: "SyntaxError",      name: "SyntaxError"
2017-04-27 21:54:11.601 WARN 4756 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'expressionCruncher': Invocation of init method failed; nested exception is org.springframework.dao.DataAccessResourceFailureException: Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=localhost:27017, type=Unknown, state=Connecting, exception={com.mongodb.MongoException$Network: Exception opening the socket}, caused by {java.net.ConnectException: Connection refused: connect}}]; nested exception is com.mongodb.MongoTimeoutException: Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=localhost:27017, type=Unknown, state=Connecting, exception={com.mongodb.MongoException$Network: Exception opening the socket}, caused b
@tansaku
tansaku / fail.txt
Created March 9, 2017 17:56
failures on g+ pull request
Failures:
1) devise/sessions/new expects the social buttons to have an origin url param for redirect
Failure/Error: expect(rendered).to have_link('Google+', '/auth/gplus?origin=')
expected to find link "Google+" but there were no matches
# ./spec/views/devise/sessions/new.html.erb_spec.rb:29:in `block (2 levels) in <top (required)>'
2) devise/sessions/new renders the social buttons
Failure/Error: expect(rendered).to have_link('Google+', '/auth/gplus')
expected to find link "Google+" but there were no matches
@tansaku
tansaku / logs.txt
Created January 15, 2017 14:46
logs related to airbrake error
Jan 15 06:14:55 websiteone-production heroku/router: at=info method=GET path="/projects" host=www.agileventures.org request_id=0a4c74bc-5915-47fb-8d1a-c4479bffc20e fwd="86.23.1.134" dyno=web.1 connect=0ms service=1478ms status=200 bytes=13393
Jan 15 06:14:55 websiteone-production app/web.1: Completed 200 OK in 1454ms (Views: 676.5ms | ActiveRecord: 622.3ms)
Jan 15 06:14:55 websiteone-production app/web.1: source=rack-timeout id=0a4c74bc-5915-47fb-8d1a-c4479bffc20e wait=10ms timeout=20000ms service=1463ms state=completed
Jan 15 06:14:56 websiteone-production app/scheduler.3366: Successfully geocoded User:2556
Jan 15 06:14:57 websiteone-production app/scheduler.3366: Successfully geocoded User:2680
Jan 15 06:14:59 websiteone-production heroku/web.1: Process running mem=735M(143.5%)
Jan 15 06:14:59 websiteone-production heroku/web.1: Error R14 (Memory quota exceeded)
Jan 15 06:14:59 websiteone-production app/scheduler.3366: Successfully geocoded User:813
Jan 15 06:15:00 websiteone-production app/