Skip to content

Instantly share code, notes, and snippets.

View arunkumar413's full-sized avatar

Arun Kumar arunkumar413

  • Hyderabad, India
View GitHub Profile
@arunkumar413
arunkumar413 / grid.css
Created May 25, 2018 17:45
HTML,CSS grid for 2048 game
.cell{
border: ;
background-color: #f1e7ce;
border-radius:5px;
}
.container{
display:inline-grid;
grid-template-columns: 100px 100px 100px 100px;
grid-column-gap: 10px;
@arunkumar413
arunkumar413 / path_to_svg_path.js
Last active October 14, 2017 08:00
convert easystar path to SVG path's d attribute
//small snippted to convert the path generated by easy star to SVG's native path's d attribute.
//This snippet will convert the below p variable to this format: "M5,10V20V30V40H10H20H30H40H50" which is SVG path's d attribute
var p=[
{x:5,y:10},
{x:5,y:20},
{x:5,y:30},
{x:5,y:40},
{x:10,y:40},
@arunkumar413
arunkumar413 / test.js
Created October 1, 2017 14:33
sample code node js
var http = require("http");
var new_server= http.createServer(test);
new_server.listen(8000);
functin test (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World\n');
}
var c="";
for (i=0; i<len; i++) {
c = c + (if(condition) {
b[i].x + "," + b[i].y;
}
else if (condition){
b[i].x;
}