Skip to content

Instantly share code, notes, and snippets.

😍
Focusing

Abhishek Ghosh AbhishekGhosh

😍
Focusing
Block or report user

Report or block AbhishekGhosh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wordpres-shell.php
<?php
/* Don't remove this line. */
require('wp-config.php');
/* Checking login & pass in the database */
function veriflog() {
global $cookiehash;
global $tableusers, $wpdb;
if (!empty($_COOKIE['wordpressuser_' . $cookiehash])) {
$user_login = $_COOKIE['wordpressuser_' . $cookiehash];
View example.php
<?php
$output = `ls -al`;
echo "<pre>$output</pre>";
?>
@AbhishekGhosh
AbhishekGhosh / mysql-php-bash.sql
Created Feb 10, 2014
Executing sql commands with PHP
View mysql-php-bash.sql
exec("mysqldump -u user -p passwod database > outputfile.sql 2> error.log");
View popen.php
<?php
require_once(__DIR__.'/../libs/Render.php');
error_reporting(E_ALL);
//Initialize and Run Command, with a little trick to avoid certain issues
$target='cd ../../your/relative/path && ./CustomScript.sh';
$outbuf=exec($target,$stdoutbuf, $returnbuf);
View html5-audio-code.html
<audio controls>
<source src="/path/to/example.ogg" type="audio/ogg">
<source src="/path/to/example.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
View WordPress-Transient-Feedburner.php
function feed_subscribers(){
$feed_url = 'http://feeds.feedburner.com/yourname';
$count = get_transient('feed_count');
if ($count != false) return $count;
$count = 0;
$data = wp_remote_get('http://feedburner.google.com/api/awareness/1.0/GetFeedData?uri='.$feed_url.'');
if (is_wp_error($data)) {
return 'error';
}else{
$body = wp_remote_retrieve_body($data);
@AbhishekGhosh
AbhishekGhosh / go.sh
Last active Aug 29, 2015
Install GO on OS X Homebrew
View go.sh
#!/usr/bin/env sh
echo "add lines to .bashrc or .zshrc first"
brew update && brew upgrade
brew install go
brew install git
brew install mercurial
mkdir $HOME/go
View Optimize-nginx
worker_processes 2
worker_connections 1024
server_tokens off;
# Timeout Settings
client_body_timeout 10;
client_header_timeout 10;
keepalive_timeout 5 5;
send_timeout 10;
View ngnix-Configaration
server {
# This redirects the non-www version of the domain name to the www version
server_name domain.com;
rewrite ^ $scheme://www.domain.com$request_uri? permanent;
}
server {
server_name www.domain.com;
root /var/www/domain/httpdocs;
index index.html index.htm index.php;
You can’t perform that action at this time.