Skip to content

Instantly share code, notes, and snippets.

View Proful's full-sized avatar

Proful Sadangi Proful

View GitHub Profile
$ rake.bat barista:brew
(in C:/hack/iliketea)
node.js:63
throw e;
^
WideCharToMultiByte: The data area passed to a system call is too small.
Error: ENOENT, No such file or directory '/cygdrive/c/hack/iliketea/C:/Documents
'
at Object.openSync (fs:153:18)
@Proful
Proful / gist:799947
Created January 28, 2011 07:14
installing mysql error.
$ gem.bat install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby.exe extconf.rb
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
@Proful
Proful / gist:799912
Created January 28, 2011 06:25
node.js on cygwin v0.2.6 ./configure step
$ ./configure
/cygdrive/c/home/node/wscript: error: Traceback (most recent call last):
File "/cygdrive/c/home/node/tools/wafadmin/Utils.py", line 274, in load_module
exec(compile(code, file_path, 'exec'), module.__dict__)
File "/cygdrive/c/home/node/wscript", line 12, in <module>
import js2c
File "/cygdrive/c/home/node/tools/js2c.py", line 35, in <module>
import jsmin
File "/cygdrive/c/home/node/tools/jsmin.py", line 1
var Express = require('express')
, express = Express.createServer()
express.listen()
var session = require('connect-redis')(Express)
, dnode = require('dnode')()
, dnodeSession = require('dnode-session')
, dnodeAuth = require('./lib/rpc.auth')
@Proful
Proful / corejs-example.js
Created January 13, 2012 17:57
Sample CoreJS App
function MainController() {
var util = require('util');
this.authRequired = true;
public_get('/login', function(req, res) {
res.rawHttpMessage("Please " + "Authenticate &rarr;".link('/auth'));
});
@Proful
Proful / gist:1668595
Created January 24, 2012 06:59
Reading json file
var http = require("http");
var options = {
host: 'vps.someoneweird.net',
port: 3000
};
http.get(options, function(res){
var data = "";
res.on('data',function(chunk){
<html>
<head>
<title>Hello World</title>
</head>
<body>
<p>Hello Idiot!!!</p>
<div><p>There is something important</p></div>
</body>
</html>
<html>
<head>
<style>
table {
background: blue;
}
.section {
width: 80%;
margin: 0 auto;
{
"name": "payment::refund",
"accountId": "TAKINGSHAPE",
"retailerId": "3",
"entityId": "50489e49-9e6e-4070-b69d-988c55feda3b",
"entityRef": "1e2e32c8-1483-46ba-96e0-e67e17db2103",
"entityType": "CREDIT_MEMO",
"entitySubtype": "DEFAULT",
"type": "NORMAL",
"attributes": {