Skip to content

Instantly share code, notes, and snippets.

View supriyo's full-sized avatar

Supriyo Sinha supriyo

View GitHub Profile
@supriyo
supriyo / gist:6172e95716a914cf6c1a
Last active August 29, 2015 14:04
Mongoengine
  • deleted references in content field and published content fields
  • using the correct field type for expando fields. when init the instance, and we get a random_content field, know to make it a container id field
  • also we use our own ID field
  • Fields:
    • ContentIDField
    • ContentMD5Field
    • AnnotationListField
    • ContainerContentIDOnlyField
    • ImageContentField
  • ImageOriginalField
@supriyo
supriyo / gist:139b522adb0cbc6641f7
Last active August 29, 2015 14:04
Moving the api to manatee
  • setup mongo db helper methods
  • content
    • models and fields
    • managers - make them use models instead of just raw dicts
    • model tests
    • fill in content views and tests
    • remove anything user related
  • publish and posts
  • try using a runtime based on this API
  • Use better controller
  • sidebar highlighting
  • required fields in form
  • form component, buildling, and fields
  • sorting
  • labels for quaterlies
  • slugification
  • topics
  • content = list
  • recursive
(marquee)supriyos-air:marquee-legacy supriyo$ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install compass --pre
Building native extensions. This could take a while...
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... yes
checking for ffi_call() in -lffi... yes
checking for ffi_prep_closure()... yes
@supriyo
supriyo / 0_reuse_code.js
Created November 3, 2013 16:27
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
================================================================================
Error executing action `start` on resource 'service[nginx]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Error executing action `start` on resource 'service[nginx]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
[2013-04-18 20:09:08] [INFO] Reprocessing Image batch, batch_size=3
Missing 1280 : 8
Missing 640 : 8
[2013-04-18 20:09:08] [INFO] Reprocessing Image (1280) image:b86257091d564e1d9aee5b04f8185240
E
======================================================================
ERROR: test_processing (apps.content_api.tests.model_tests.Test_Image)
----------------------------------------------------------------------
Traceback (most recent call last):
[2013-04-01T19:10:02+00:00] ERROR: Running exception handlers
[2013-04-01T19:10:02+00:00] ERROR: Exception handlers complete
[2013-04-01T19:10:02+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-04-01T19:10:02+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: script[Install Requirements] (main::site-setup line 95) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20130401-14154-fpgaqc-0" ----
STDOUT: Obtaining rqworker from git+git://github.com/jgelens/rq.git@cc1179295889ea0f7f6#egg=rqworker (from -r /var/www/marquee/marquee/requirements.txt (line 1))
Updating /var/www/envs/marquee/src/rqworker clone (to cc1179295889ea0f7f6)
Complete output from command /usr/bin/git fetch -q:
----------------------------------------
{
"block": {
"id": "embed:0b755bf2-8048-40aa-bc59-e615cba5e080",
"pct_y_offset": 0.5331421287444232,
"type": "embed"
},
"keen": {
"created_at": "2013-03-11T23:23:35.718000+00:00",
"timestamp": "2013-03-11T23:23:35.718000+00:00"
},