Skip to content

Instantly share code, notes, and snippets.

View biswarupadhikari's full-sized avatar

Biswarup Adhikari biswarupadhikari

View GitHub Profile
biswarupadhikari / gist:3304593
Created August 9, 2012 14:23
How to extract .tar.bz2 and .tar.gz file in Linux
Tar is an archiving utility in Linux. Lets see how can we extract various archived files in Linux using this utility. We will also see the meaning of the options provided with the commands. Type the following commands in terminal (Keyboard short cut: Ctrl+Alt+T in Ubuntu):
Extracting .tar.bz2:
tar xvjf filename.tar.bz2 location
Extracting .tar.gz:
tar xvzf filename.tar.gz location
x — extract
v — verbose (it will show the extracting files in the terminal)
biswarupadhikari / subdir.php
Created January 4, 2013 15:34
is_subdir php function. How to check is sub directory is php
function is_subdir($parent,$sub){
return false;
biswarupadhikari / gist:4038614
Created November 8, 2012 12:50
How to Detect Right Click Linux Java JTable
jt.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
int r = jt.rowAtPoint(e.getPoint());
if (r >= 0 && r < jt.getRowCount()) {
jt.setRowSelectionInterval(r, r);
} else {
int rowindex = jt.getSelectedRow();
biswarupadhikari /
Created February 9, 2013 05:17
How to increase video volume using ffmpeg
ffmpeg -i Manage-Event-Using-ICAgenda-Demostration.mp4 -vol 1280 -vcodec copy /home/adidac/Desktop/test.mp4
biswarupadhikari / joomlaLoginValidator.php
Created August 10, 2012 07:08
How to validate Joomla Login
function validateLogin($username,$password){
jimport( 'joomla.user.authentication');
$auth = & JAuthentication::getInstance();
$credentials = array( 'username' => $username, 'password' => $password );
$options = array();
$response = $auth->authenticate($credentials, $options);
if ($response->status === JAUTHENTICATE_STATUS_SUCCESS) {
$response->status = true;
biswarupadhikari / selectMysql.jsp
Created July 30, 2012 06:57
How to Select And Display Mysql Record Using JSP
<%@page import="java.sql.*"%>
<%@page import="com.mysql.jdbc.PreparedStatement"%>
<%@page import="com.mysql.jdbc.Connection"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
biswarupadhikari / gist:3969459
Created October 28, 2012 18:53
Backtrack5 GUI Not Showing Or startx not working
Run These Command
rm /root/.kde/cache-root/icon-cac­he.kcache
rm /root/.kde/cache-root/plasma_t­heme_Volatile.kcache
rm /root/.kde/cache-bt/icon-cache­.kcache
rm /root/.kde/cache-bt/plasma_the­me_Volatile.kcache
biswarupadhikari / paypalCurrencySelectDropDown.html
Last active May 19, 2017 15:47
Paypal Currency Select Drop Down
<select name="currency_code">
<option value="">Select Currency</option>
<option value="AUD">Australian Dollar</option>
<option value="BRL">Brazilian Real </option>
<option value="CAD">Canadian Dollar</option>
<option value="CZK">Czech Koruna</option>
<option value="DKK">Danish Krone</option>
<option value="EUR">Euro</option>
<option value="HKD">Hong Kong Dollar</option>
<option value="HUF">Hungarian Forint </option>
biswarupadhikari / validate.js
Created November 19, 2013 03:28
Validate Version using Javascript
function validateVersion(version){
var pat=/^[0-9]{1,3}.[0-9]{0,3}.[0-9]{0,3}$/;
return pat.test(version)
Validate Version
var version="10.2.5";
biswarupadhikari / Model.php
Created October 23, 2013 21:32
Joomla Custom Server Side Va
* Validate Data
function validate($form, $data,$group=null){
return $data;