Skip to content

Instantly share code, notes, and snippets.

View sentience's full-sized avatar
💭
Amplifying the Product Group at Culture Amp

Kevin Yank sentience

💭
Amplifying the Product Group at Culture Amp
View GitHub Profile
@sentience
sentience / gist:4535222
Created January 15, 2013 01:29
Encountering an error building sqlite rubygem on OS X 10.8.2. sqlite3 version installed on system is 3.7.12. XCode 4.5.2 command-line tools are installed.
/Users/kyank/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... yes
checking for sqlite3_initialize()... yes
checking for sqlite3_backup_init()... yes
checking for sqlite3_column_database_name()... no
checking for sqlite3_enable_load_extension()... no
checking for sqlite3_load_extension()... no
checking for sqlite3_open_v2()... yes
@sentience
sentience / mkmf.log
Created January 15, 2013 02:16
Output of failed attempt to compile sqlite3 rubygem on OSX 10.8.2.
find_header: checking for sqlite3.h... -------------------- yes
"/usr/local/bin/gcc-4.2 -o conftest -I/Users/kyank/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/x86_64-darwin12.2.1 -I/Users/kyank/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/ruby/backward -I/Users/kyank/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Users/kyank/.rvm/usr/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -fno-common -pipe conftest.c -L. -L/Users/kyank/.rvm/rubies/ruby-1.9.3-p362/lib -L/Users/kyank/.rvm/usr/lib -L. -L/usr/local/lib -L/Users/kyank/.rvm/usr/lib -lruby.1.9.1 -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */
@sentience
sentience / gist:5480507
Created April 29, 2013 08:59
Error running Opscode official DMG cookbook (v.1.0.0) on Chef 10.24.4.
================================================================================
Recipe Compile Error in /var/cache/chef/cookbooks/dmg/resources/package.rb
================================================================================
ArgumentError
-------------
wrong number of arguments (2 for 1)
Cookbook Trace:
---------------
@sentience
sentience / error.log
Created May 23, 2013 10:07
My nginx config for a unicorn-hosted Rails app. Hitting unicorn directly serves the application; however, attempting to load it via nginx produces a “directory index of … is forbidden” error as shown below. If I put an index.html file in the applicaiton’s `public` directory, nginx serves it fine.
2013/05/23 08:12:15 [error] 19732#0: *1 directory index of "/var/www/leakcrawler/current/public/" is forbidden, client: 58.6.229.249, server: leakcrawler.example.com, request: "GET / HTTP/1.1", host: "leakcrawler.example.com"
@sentience
sentience / _.remove.js
Last active April 21, 2020 20:47 — forked from lstebner/_.remove.js
Underscore.js mixing to remove one or more keys from an object
// remove key from object
_.mixin({
remove: function(obj, keys){
return _.chain([keys]).flatten().reduce(function(obj, key){
delete obj[key];
return obj;
}, obj).value();
}
});
@sentience
sentience / keybase.md
Created May 15, 2017 04:03
keybase.md

Keybase proof

I hereby claim:

  • I am sentience on github.
  • I am sentience (https://keybase.io/sentience) on keybase.
  • I have a public key ASBoMOtj5kDyBJ3Kukp51PDt5dOvi5BuxMfP7NnTBVQ3owo

To claim this, I am signing this object:

@sentience
sentience / ErrorMessagePlugin.js
Created May 15, 2017 21:42
Webpack error message plugin
var stripAnsi = require('strip-ansi');
var jsStringEscape = require('js-string-escape');
var RawSource = require('webpack/lib/RawSource');
var errorTypePattern = /ModuleBuildError:[^:]*: /g;
// a webpack plugin to emit a js asset which displays build errors
function ErrorMessagePlugin(filename) {
this.filename = filename || 'webpackErrorMessages.js';
}
@sentience
sentience / #Synology MEGAcmd server setup instructions.md
Last active June 25, 2024 11:56 — forked from Detavern/README.md
MEGAcmd startup on Synology DSM

Last verified on Synology DSM 7.0.1.

Prerequisites

  • install MEGAcmd package in DSM package center
  • enable user home service (Control Panel → User & Group → Advanced → User Home)
  • set up MEGAcmd so you can run mega-cmd-server from your Synology terminal prompt and see the server start (then use Ctrl-C to stop it)

Set up sysctld service for MEGAcmd server