Skip to content

Instantly share code, notes, and snippets.

View arunkumar413's full-sized avatar

Arun Kumar arunkumar413

  • Hyderabad, India
View GitHub Profile
var c="";
for (i=0; i<len; i++) {
c = c + (if(condition) {
b[i].x + "," + b[i].y;
}
else if (condition){
b[i].x;
}
@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');
}
@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 / 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 / wifi.js
Created May 28, 2018 08:11
wifi settings servonk
var div = document.querySelector('wifi');
var wifi = navigator.mozWifiManager;
var d = [];
var request = wifi.getNetworks();
request.onsuccess = function () {
console.log(this.result);
var networks= this.result;
networks.sort(sortNetworks)
var div = document.querySelector('wifi');
var wifi = navigator.mozWifiManager;
var d = [];
var request = wifi.getNetworks(); // get the available networks
request.onsuccess = function () {
console.log(this.result);
var networks= this.result;
networks.sort(sortNetworks)
@arunkumar413
arunkumar413 / README.md
Created June 1, 2018 11:01 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@arunkumar413
arunkumar413 / array_of_objects.js
Created August 30, 2018 16:16
return the objects ordered by ranking and another to return the average ranking.
var a = [{name:'john',rank:10},{name:"Alex",rank:5}];
var avg_rank=0;
ordered_array = order_rank(a);
console.log(ordered_array);
avg = find_avg(a);
console.log(avg);
function order_rank(a){
arun@arun-HP-Pavilion-g6-Notebook-PC:~/Documents/servo$ ./mach build --release --android
rustc 1.34.0-nightly (0ea22717a 2019-03-02)
info: component 'rust-std' for target 'armv7-linux-androideabi' is up to date
warning: clang: warning: argument unused during compilation: '-L/home/arun/Downloads/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x'
Finished release [optimized] target(s) in 3.85s
Swapping prefs
21:22:30.211 [INFO] [org.gradle.internal.nativeintegration.services.NativeServices] Initialized native services in: /home/arun/.gradle/native
21:22:31.369 [INFO] [org.gradle.internal.work.DefaultWorkerLeaseService] Using 4 worker leases.
21:22:31.446 [INFO] [org.gradle.cache.internal.DefaultCacheAccess] Creating new cache for fileHashes, path /home/arun/.gradle/caches/4.4/fileHashes/fileHashes.bin, access org.gradle.cache.internal.DefaultCacheAccess@796d3c9f
21:22:31.463 [DEBUG] [org.gradle.api.internal.changedetection.state.InMemoryCacheDeco
arun@arun-HP-Pavilion-g6-Notebook-PC:~$ kubectl logs raven-0
_____ _____ ____
| __ \ | __ \| _ \
| |__) |__ ___ _____ _ __ | | | | |_) |
| _ // _` \ \ / / _ \ '_ \| | | | _ <
| | \ \ (_| |\ V / __/ | | | |__| | |_) |
|_| \_\__,_| \_/ \___|_| |_|_____/|____/
Safe by default, optimized for efficiency