Skip to content

Instantly share code, notes, and snippets.

View rahulchhangani's full-sized avatar
💭
Founder Fistreet India

Rahul Chhangani rahulchhangani

💭
Founder Fistreet India
View GitHub Profile
@rahulchhangani
rahulchhangani / jdk_download.sh
Created February 20, 2017 03:53 — forked from P7h/jdk_download.sh
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
@rahulchhangani
rahulchhangani / README.md
Created October 21, 2016 15:21 — forked from hugolpz/README.md
Topography via D3js image processing

Proof of concept of grayscale image recolored directly via D3js color scale. Wikimaps colors used.

Source: The source image is a global heightmap from the Shuttle Radar Topography Mission, released as part of NASA’s Blue Marble collection at 8km resolution. The topography data is stored in a simple 130KB black&white, 8-bit PNG. In it, darker values represent lower elevations (sea floor), lighter values represent higher elevations (mountains).

Colors are read out of the image using the Canvas API.

Data properties:

@rahulchhangani
rahulchhangani / MY_Security.php
Created October 2, 2016 16:46 — forked from CMCDragonkai/MY_Security.php
PHP: Codeigniter CSRF functionality does not support putting the CSRF token in the HTTP headers for the purposes of the double submit cookie method. It also only runs the CSRF check on POST and not on PUT or DELETE. This drop in MY_Security.php makes sure CSRF runs on POST, PUT or DELETE and checks the HTTP headers for X-XSRF-TOKEN recommended b…
<?php
class MY_Security extends CI_Security{
//overriding the normal csrf_verify, this gets automatically called in the Input library's constructor
//verifying on POST and PUT and DELETE
public function csrf_verify(){
$request_method = strtoupper($_SERVER['REQUEST_METHOD']);
@rahulchhangani
rahulchhangani / html_form
Created September 9, 2016 10:48 — forked from zvineyard/html_form
PHP: Upload and Rename File
<form action="" enctype="multipart/form-data" method="post">
<input id="file" name="file" type="file" />
<input id="Submit" name="submit" type="submit" value="Submit" />
</form>
@rahulchhangani
rahulchhangani / eclipse-install.md
Created September 7, 2016 02:01 — forked from tuxdna/eclipse-install.md
Install Eclipse on Fedora 23
sudo dnf install -y eclipse-{platform,pydev,cdt-sdk,egit,webtools-javaee}
sudo dnf install -y eclipse-dltk-{ruby,mylyn,rse,tests,sdk,tcl,itcl,xotcl}
sudo dnf install -y eclipse-color-theme