- Details
- Written by: Stanko Milosev
- Category: Jasmine
- Hits: 861
I had a problem to test touchmove and mouseve events.
- Details
- Written by: Stanko Milosev
- Category: Moment
- Hits: 3988
I was playing little with jQuery UI datePicker, and Moment.js library, and here you can see result of it. Also, that source can be used for jQuery UI development, since I extracted only necessary files.
In my example most important are these two lines of code:
var $myDate = $( "#datepicker" ).datepicker( "getDate" ); var $formatedMyDate = moment($myDate).format('YYYY-MM-DD hh:mm');
As you can see with line:
moment($myDate).format('YYYY-MM-DD hh:mm');
Date $myDate, I am formating to format YYYY-MM-DD hh:mm
- Details
- Written by: Stanko Milosev
- Category: node.js
- Hits: 4053
Today I discovered stylelint, and here is my example how to use it on windows, since I was struggling with CLI in windows.
First to install stylelint I was using this command:
npm install stylelint
After that I installed standard configuration:
npm install stylelint-config-standard
After that step in folder ..\node_modules\stylelint-config-standard you can find file index.js, which I copy / pasted to folder ..\node_modules\.bin and renamed to stylelint.config.js
Then I went to folder ..\node_modules\.bin in command prompt, and wrote on CSS with empty rule, something like:
a {}
In command prompt executed:
stylelint *.css
And voilà:
There is also possibility to use stylelint against less files, as explained here, but I didn't test it.
- Details
- Written by: Stanko Milosev
- Category: node.js
- Hits: 3916
One example of streaming videos using VidStreamer.js.
Server:
/*global require*/ var http = require("http"); var vidStreamer = require("vid-streamer"); var newSettings = { rootFolder: "C:/videoStreaming/videos/", rootPath: "videos/", forceDownload: false }; var app = http.createServer(vidStreamer.settings(newSettings)); app.listen(3000);
Client:
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> </head> <body> <video autoplay> <source src="http://localhost:3000/videos/a.mp4" type="video/mp4"> </video> </body> </html>