Skip to content

Instantly share code, notes, and snippets.

View marti1125's full-sized avatar
๐Ÿ

Willy Aguirre marti1125

๐Ÿ
View GitHub Profile
@marti1125
marti1125 / gist:a66d0e1fdf5bd868e360
Created August 27, 2014 15:52
gulp-firefoxos-example
C:\Users\Willy\Documents\gulp-firefoxos-example>npm install
npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/gulp-zip
npm http GET https://registry.npmjs.org/fxos-reloadcss
npm http GET https://registry.npmjs.org/fxos-deploy
npm http GET https://registry.npmjs.org/gulp
npm http 200 https://registry.npmjs.org/fxos-deploy
npm ERR! Error: No compatible version found: fxos-deploy@'^0.1.0'
npm ERR! Valid install targets:
npm ERR! ["0.1.0"]
C:\Users\Willy\Documents\appmaker>nf start
[OKAY] Loaded ENV .env File as KEY=VALUE Format
[OKAY] Trimming display Output to 81 Columns
10:17:18 web.1 | PUBLISH_HOST set to 192.168.1.106.xip.io:12319
10:17:22 web.1 | C:\Users\Willy\Documents\appmaker\node_modules\webmaker-auth\index.js:17
10:17:22 web.1 | throw new Error('(webmaker-auth): loginURL was not passed into configurati
10:17:22 web.1 | ^
10:17:22 web.1 | Error: (webmaker-auth): loginURL was not passed into configuration.
10:17:22 web.1 | at new module.exports (C:\Users\Willy\Documents\appmaker\node_modules\webmake.
10:17:22 web.1 | at Object.<anonymous> (C:\Users\Willy\Documents\appmaker\app.js:78:20)
@marti1125
marti1125 / gist:c2b93ba5cdef7ac0f464
Created August 22, 2014 16:15
itext show in pdf vierwer
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
// step 1
Document document = new Document();
// step 2
PdfWriter writer = PdfWriter.getInstance(document, outputStream);
// step 3
document.open();
// step 4
document.add(new Paragraph("Hello World! 2222555"));
// step 5
@marti1125
marti1125 / gist:c8a5df4c1f06ece1d2af
Created August 21, 2014 21:47
de in - out y de out - in
//pasa a output
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] bytes = IOUtils.toByteArray(pdfYExcelStream);
out.write(bytes);
out.close();
// de output a input!!
<div class="container">
<div class="row">
<div class="col-md-12">
<ul class="breadcrumb">
<li><a href="#"><i class="fa fa-cogs"></i> Mantenimiento</a></li>
</ul>
</div>
<div class="col-md-12">
<div class="col-md-2 center">
<a href="usuarios/list">
CREATE INDEX index_01
ON Customers(LastName)
CREATE INDEX index_02
ON Employees(LastName)
CREATE INDEX index_03
ON Sales(ProductID,Quantity)
CREATE INDEX index_04
WITH ec AS ( SELECT C.LastName AS Customer
, e.LastName AS SalesPerson
, s.ProductID
, p.Name AS ProductName
, SUM(s.Quantity) AS quantity
, SUM(p.Price * s.Quantity) AS amount
, SUM(SUM(s.Quantity)) OVER (PARTITION BY s.ProductID)*1.0/SUM(COUNT(*)) OVER (PARTITION BY s.ProductID) AS Avg_Qty
FROM dbo.Sales s
JOIN dbo.Customers c ON s.CustomerID = c.CustomerID
JOIN dbo.Employees e ON s.SalesPersonID = e.EmployeeID
drop table promedio_cantidad
create table promedio_cantidad
(
Customer varchar(100) null,
SalesPerson varchar(100) null,
ProductID int null,
ProductName varchar(100) null,
quantity float null,
amount float null
@marti1125
marti1125 / gist:74fc37e938e6b2e81f29
Created July 15, 2014 20:37
last issue for fix
04:55:19 p.m. - marti1125: this ? https://issues.apache.org/jira/browse/CB-4556
04:55:55 p.m. - marti1125: what does mean r+ ?
04:57:22 p.m. - marti1125: https://issues.apache.org/jira/browse/CB-5610
04:57:29 p.m. - rodms: ah, r+ is a bugzilla thing we carried over :) It means it passed the review
04:57:54 p.m. - marti1125: ohhhh, :)
05:00:35 p.m. - rodms: marti1125: https://issues.apache.org/jira/browse/CB-4556 looks like a good one
05:00:59 p.m. - rodms: from the comment it needs a clean.bat file to work on windows
05:02:54 p.m. - rodms: CB-5610 is more involved, we need to investigate if it's even possible to implement the APIs in firefoxOS
05:03:06 p.m. - rodms: and it may only be possible on more recent versions
05:03:11 p.m. - marti1125: ok what repo I fork?
// registering remote methods
client.registerMethod("jsonGetInfAboutUserByEmail",
url_server+"/api/v1/users/?app_name="+app_name+"&app_key="+api_key+"&[email protected]", "GET");
client.methods.jsonGetInfAboutUserByEmail(function(data,response){
// parsed response body as js object
console.log(data); // iterate
// raw response
console.log(response);
});