Skip to content

Instantly share code, notes, and snippets.

@matejkramny
matejkramny / main.go
Created March 5, 2021 23:06
mongodb/naming enhancement for gogo protobuf generator
// Protocol Buffers for Go with Gadgets
//
// Copyright (c) 2015, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
@matejkramny
matejkramny / logout.js
Created October 26, 2013 19:58
Logout angular ui-router
app.config(function($stateProvider, $urlRouterProvider, $locationProvider) {
$stateProvider.state('logout', {
url: '/logout',
controller: function($scope, $route) {
$route.reload()
}
})

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

/*
base64.cpp and base64.h
Copyright (C) 2004-2008 Ren� Nyffenegger
This source code is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages
arising from the use of this software.
../src/msgpack.cc:1:10: fatal error: 'v8.h' file not found
#include <v8.h>
^
1 error generated.
make: *** [Release/obj.target/msgpackBinding/src/msgpack.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
@matejkramny
matejkramny / gist:8072120
Created December 21, 2013 17:07
Used within networking of iOrder app
- (NSMutableArray *)loopAndLoad:(NSArray *)args object:(Class)target {
NSMutableArray *arr = [[NSMutableArray alloc] init];
if ([args count] == 0) {
return arr;
}
for (NSDictionary *x in [args objectAtIndex:0]) {
id<NetworkLoadingProtocol> obj = [[target alloc] init];
[obj loadFromJSON:x];
@matejkramny
matejkramny / npm-debug.log
Last active December 28, 2015 16:09
NPM Fetch failed
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install', 'nodemailer' ]
2 info using npm@1.3.11
3 info using node@v0.10.20
4 warn package.json eyes@0.1.8 No repository field.
5 verbose cache add [ 'nodemailer', null ]
6 verbose cache add name=undefined spec="nodemailer" args=["nodemailer",null]
7 verbose parsed url { protocol: null,
7 verbose parsed url slashes: null,
7 verbose parsed url auth: null,
@matejkramny
matejkramny / gist:6542157
Created September 12, 2013 18:49
Freeing up RAM
root@matej:/home/matej# free && sync && echo 3 > /proc/sys/vm/drop_caches && free
total used free shared buffers cached
Mem: 16325368 14747668 1577700 0 447096 11072424
-/+ buffers/cache: 3228148 13097220
Swap: 1050616 25020 1025596
total used free shared buffers cached
Mem: 16325368 3020272 13305096 0 1888 111772
-/+ buffers/cache: 2906612 13418756
Swap: 1050616 25020 1025596
@matejkramny
matejkramny / jitsu.log
Created April 3, 2013 13:45
Nodejitsu 500
info: Welcome to Nodejitsu matejkramny
info: jitsu v0.11.3, node v0.8.14
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in app.js
info: Creating snapshot 0.0.2-20
info Uploading: [=============================] 100%
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error: npm http GET https://registry.npmjs.org/express/3.0.6
@matejkramny
matejkramny / jitsu.log
Created March 26, 2013 23:12
Nodejitsu complaining
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
warn: Error returned from Nodejitsu
error: Error: Subdomain chosen belongs to another user
error: at AppController._isFreeRootSubdomain (/root/nodejitsu/lib/nodejitsu/resources/app/controller.js:966:17)
error: at Resource._request (/root/nodejitsu/node_modules/resourceful/lib/resourceful/resource.js:184:13)
error: at Function.Resource.runAfterHooks (/root/nodejitsu/node_modules/resourceful/lib/resourceful/resource.js:93:12)
error: at Resource._request (/root/nodejitsu/node_modules/resourceful/lib/resourceful/resource.js:179:14)
error: at Couchdb.view (/root/nodejitsu/node_modules/resourceful/lib/resourceful/engines/couchdb/index.js:143:5)
error: at Request.cradle.Connection.request [as _callback] (/root/nodejitsu/node_modules/resourceful/node_modules/cradle/lib/cradle.js:213:9)