Skip to content

Instantly share code, notes, and snippets.

@glasser
glasser / keybase.md
Created March 26, 2014 22:13
Keybase verification

Keybase proof

I hereby claim:

  • I am glasser on github.
  • I am glasser (https://keybase.io/glasser) on keybase.
  • I have a public key whose fingerprint is 18A1 3E27 5DF9 37DA 7DA8 E9C5 B5AC B6C4 5396 057D

To claim this, I am signing this object:

@glasser
glasser / gist:98cfb41154e9a5afb0ec
Created November 4, 2014 23:45
gem install error
ubuntu@ip-10-13-187-68:~$ sudo gem install mosql
ERROR: Could not find a valid gem 'mosql' (>= 0) in any repository
ERROR: Possible alternatives: mosql
ubuntu@ip-10-13-187-68:~$ sudo gem update
Updating installed gems
Nothing to update
ubuntu@ip-10-13-187-68:~$ sudo gem install mosql
ERROR: Could not find a valid gem 'mosql' (>= 0) in any repository
ERROR: Possible alternatives: mosql
ubuntu@ip-10-13-187-68:~$ gem help
glasser@perseid 0 ~/Projects/Meteor/testing-cordova $ meteor --release 1.0 create --example localmarket
localmarket: created.
To run your new app:
cd localmarket
meteor
glasser@perseid 0 ~/Projects/Meteor/testing-cordova $ cd localmarket
glasser@perseid 0 ~/Projects/Meteor/testing-cordova/localmarket $ meteor run ios
request: updating npm dependencies -- request...
Error while running for mobile platforms: Error running /Users/glasser/.meteor/packages/meteor-tool/.1.0.35.wql4jh++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/cordova-scripts/cordova.sh
@glasser
glasser / gist:114a341e9828849ffc87
Created February 6, 2015 17:32
failing self-tests
authorized: authorized - no username ...
... fail!
=> no-match at tools/tests/authorized.js:143
=> Pattern: : added test
=> Last 100 lines:
2| You must be logged in for that. Try 'meteor login'
cordova-plugins: add cordova plugins ...
... ok (134170 ms)
deploy-auth: deploy - expired credentials ...
... fail!
glasser@glasser-lyrid 0 ~/Scratch/issue-4068 $ vagrant init ubuntu/trusty64
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
glasser@glasser-lyrid 0 ~/Scratch/issue-4068 $ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
This file has been truncated, but you can view the full file.
[[1,1],1,[true],"bw==","o","ygcA"]
[[2,2],2,[true],"YVsie1wic2VydmVyX2lkXCI6XCIwXCJ9Il0=","a[\"{\\\"server_id\\\":\\\"0\\\"}\"]","SoxWqo5RKk4tKkstis9MiVGyilEyiFGqVYoFAA=="]
[[3,3],3,[true],"YVsie1wibXNnXCI6XCJjb25uZWN0ZWRcIixcInNlc3Npb25cIjpcIlFlcjhYdVdqbk5SaDZnMmRMXCJ9Il0=","a[\"{\\\"msg\\\":\\\"connected\\\",\\\"session\\\":\\\"Qer8XuWjnNRh6g2dL\\\"}\"]","gsjkFqeDxZLz8/JSk0tSgSp0QOqLizPz88AygalFFhGl4Vl5fkEZZulGKT5g3QAA"]
[[4,4],4,[true],"YVsie1wibXNnXCI6XCJhZGRlZFwiLFwiY29sbGVjdGlvblwiOlwibWV0ZW9yX2F1dG91cGRhdGVfY2xpZW50VmVyc2lvbnNcIixcImlkXCI6XCJNYUtEa0J0cnI1bk56M1F2MlwiLFwiZmllbGRzXCI6e1wiY3VycmVudFwiOnRydWV9fSJd","a[\"{\\\"msg\\\":\\\"added\\\",\\\"collection\\\":\\\"meteor_autoupdate_clientVersions\\\",\\\"id\\\":\\\"MaKDkBtrr5nNz3Qv2\\\",\\\"fields\\\":{\\\"current\\\":true}}\"]","QtWdmJIC1Zmcn5MDNAemOTe1JDW/KD6xtCS/tCAlsSQ1PjknMzWvJCy1CGRBMVgP1Fm+id4u2U4lRUWmeX5VxoFlRmDJtMzUnBSgOiugdcmlRUVAzUBOSVFpai3QGQAA"]
[[5,5],5,[true],"YVsie1wibXNnXCI6XCJhZGRlZFwiLFwiY29sbGVjdGlvblwiOlwibWV0ZW9yX2F1dG91cGRhdGVfY
@glasser
glasser / flycheck-top-window.el
Last active September 16, 2015 00:34
Preserving Emacs flycheck's error window
(defconst top-window-height 10 "Height to set top window to when splitting")
(defun ensure-top-window ()
(interactive)
(let* ((w (selected-window))
(is-top (and
(eq (window-parent w) (frame-root-window))
(eq (window-top-child (frame-root-window)) w))))
; Make sure we're the top window, and default our height to
; top-window-height. This is a little destructive (loses all window state)
; but generally only happens once per session.
@glasser
glasser / stpncpy.patch
Created October 27, 2011 00:09
gettext patch 1
diff -Naurp gettext-0.18.1.1.orig/gettext-tools/configure gettext-0.18.1.1/gettext-tools/configure
--- gettext-tools/configure 2010-06-06 13:12:20.000000000 -0700
+++ gettext-tools/configure 2010-08-13 23:24:09.000000000 -0700
@@ -40606,7 +40606,9 @@ else
#include <stdlib.h>
#include <string.h> /* for strcpy */
/* The stpncpy prototype is missing in <string.h> on AIX 4. */
+#ifndef stpncpy
extern char *stpncpy (char *dest, const char *src, size_t n);
+#endif
--- gettext-tools/Makefile.in.orig 2010-06-03 16:38:55.000000000 -0500
+++ gettext-tools/Makefile.in 2010-06-04 01:16:07.000000000 -0500
@@ -1248,7 +1248,7 @@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
-SUBDIRS = doc intl gnulib-lib libgrep src libgettextpo po projects styles misc man m4 tests gnulib-tests examples
+SUBDIRS = doc intl gnulib-lib libgrep src libgettextpo po projects styles misc man m4 tests gnulib-tests
# Allow users to use "gnulib-tool --update".
// This program is a workaround for
// https://github.com/docker/docker/issues/13914
//
// Sometimes docker fails to properly clean up DOCKER routing rules and then
// traffic to the new version of the container gets blackholed. Running this
// scripts frequently as root should mitigate this.
package main
import (
"bufio"