Skip to content

Instantly share code, notes, and snippets.

View nbhatti's full-sized avatar

Muhammad Naseer Bhatti nbhatti

View GitHub Profile
#!/bin/bash
################################
# OS X Install ISO Creater #
# #
# Author: shela #
################################
#######################################
# Declarations
@nbhatti
nbhatti / gist:6bdaec34dea6da984d2d2773c6a99777
Created April 20, 2017 15:29
show engine tokudb status
TokuDB disk free space more than 10 percent of total file system space
TokuDB time of environment creation Thu Apr 13 20:15:02 2017
TokuDB time of engine startup Mon Apr 17 14:24:08 2017
TokuDB time now Thu Apr 20 16:29:03 2017
TokuDB db opens 6574
TokuDB db closes 6551
TokuDB num open dbs now 23
TokuDB max open dbs 25
TokuDB period, in ms, that recovery log is automatically fsynced 0
TokuDB dictionary inserts 5996397
@nbhatti
nbhatti / gist:f428b5e731bfc9b1695db89027483125
Created April 20, 2017 15:28
show engine innodb status
=====================================
2017-04-20 16:28:26 0x7fbde8678700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 53 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 256677 srv_active, 0 srv_shutdown, 9916 srv_idle
srv_master_thread log flush and writes: 266553
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @license http://codeigniter.com/user_guide/license.html
local t_sum = 0
local t_num = 0
local t1, t2, t3
local do_time = true
local function mark1()
if not do_time then return end
t1 = os.clock()
end
@nbhatti
nbhatti / lgraph
Last active August 29, 2015 14:25 — forked from tylerneylon/lgraph
#!/usr/local/bin/lua
usage_str = [[
Usage:
lgraph 'function of x'
Example:
lgraph 'x^2'
]]
Grapher = {xmin = -1, xmax = 1, ymin = -1, ymax = 1, ncols = 160, nrows = 50}
@nbhatti
nbhatti / keylog.c
Last active August 29, 2015 14:25 — forked from tylerneylon/keylog.c
// keylog.c
//
// Usage:
// ./keylog [command ...]
//
// This runs the given command, capturing all keyboard input in the file
// "outfile." This is currently written for mac os x. I'm guessing slight edits
// would allow it to work on other *nix systems as well.
//
// I learned how to do this by looking at the source of the "script" binary,
-- time_lock_inj.lua
--
local usage_str = [[
Usage:
lua time_lock_inj.lua <list_of_input_source_files>
Injects lock timing code for all the given files.
This assumes you're locking things with calls to
@nbhatti
nbhatti / postgresql.conf
Created February 17, 2015 13:09
Postgres Config
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# (The "=" is optional.) Whitespace may be used. Comments are introduced with
# "#" anywhere on a line. The complete list of parameter names and allowed