Skip to content

Instantly share code, notes, and snippets.

View masudiiuc's full-sized avatar

Md Mahabubul Hasan Masud masudiiuc

View GitHub Profile
@ihumanable
ihumanable / Excel.php
Last active February 6, 2024 06:24
Simple Excel Writer in PHP
<?php
/**
* Simple excel writer class with no external dependencies, drop it in and have fun
* @author Matt Nowack
* @link https://gist.github.com/ihumanable/929039/edit
* @license Unlicensed
* @version 1.0
*/
class Excel {
@msonnabaum
msonnabaum / gist:1306569
Created October 22, 2011 22:28
install xhprof on mamp for php 5.3
wget http://pecl.php.net/get/xhprof-0.9.2.tgz
tar -xzf xhprof-0.9.2.tgz
cd xhprof-0.9.2/extension
/Applications/MAMP/bin/php/php5.3.6/bin/phpize
./configure
make
cp modules/xhprof.so $(/Applications/MAMP/bin/php/php5.3.6/bin/php-config --extension-dir)/
echo "extension=xhprof.so" >> /Applications/MAMP/bin/php/php5.3.6/conf/php.ini
@phpfour
phpfour / pecl_http.php
Created April 7, 2012 16:55
Generic use of pecl_http
<?php
// GET
$req = new HttpRequest('http://www.example.com');
$req->send();
echo "Response code: " . $req->getResponseCode(), PHP_EOL;
echo "Response body: ", PHP_EOL, $req->getResponseBody();
@2bard
2bard / translation_notes
Created December 18, 2012 16:29
Using Symfony translation component in Twig outside of Symfony2 framework.
Note: I've left some of the full package names in tact to show exactly where the class comes from.
#### Pull dependencies in using composer ####
//Example composer.json
{
"require": {
"symfony/config" : "2.1.0",
"symfony/yaml" : "2.1.0",
"twig/twig": "1.9.0",
@barryvdh
barryvdh / _ide_helper.php
Last active May 6, 2024 07:45
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
@omurphy27
omurphy27 / transparent background image pattern overlay.css
Created March 26, 2013 04:59
CSS Transparent Background Image Pattern Overlay
/*Transparent pattern placed over an image, like we see on the bootstrap homepage: http://twitter.github.com/bootstrap/index.html*/
div {
width: 200px;
height: 200px;
display: block;
position: relative;
background: url(images/background-image.png);
}
@ijason
ijason / SigPad.js
Last active December 19, 2015 04:38
Signature Pad with HTML5
<script type="text/javascript">
$(document).ready(function () {
//User Variables
var canvasWidth = 400; //canvas width
var canvasHeight = 60; //canvas height
var canvas = document.getElementById('canvas'); //canvas element
var context = canvas.getContext("2d"); //context element
var clickX = new Array();
var clickY = new Array();
@vavrecan
vavrecan / rename-apk-namespace
Last active March 20, 2022 08:53
Script that allows renaming namespace of Android APK so you can install same application multiple times
#!/bin/bash
# author Marek Vavrecan (vavrecan@gmail.com)
# show usage
[ $# -eq 0 ] && { echo "Usage: $0 [apk path] [source namespace] [target namespace]"; exit 1; }
APK_PATH="$1"
NAMESPACE_FROM="$2"
NAMESPACE_TO="$3"
@natelandau
natelandau / .bash_profile
Last active June 13, 2024 18:01
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@mathiasbno
mathiasbno / ZigPad.js
Last active May 19, 2017 16:05 — forked from ijason/SigPad.js
<script type="text/javascript">
$(document).ready(function () {
//User Variables
var canvasWidth = 400; //canvas width
var canvasHeight = 60; //canvas height
var canvas = document.getElementById('canvas'); //canvas element
var context = canvas.getContext("2d"); //context element
var clickX = new Array();
var clickY = new Array();