Skip to content

Instantly share code, notes, and snippets.

View merin83's full-sized avatar
☀️
Creating New Things

Md. Estiak Ahmmed (Merin) merin83

☀️
Creating New Things
View GitHub Profile
@tarex
tarex / zshrc.sh
Created August 14, 2012 14:12
my .zshrc
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#ZSH_THEME="robbyrussell"
# ZSH_THEME="blinks"
# ZSH_THEME ="prose"
@tarex
tarex / index.php
Created August 26, 2012 13:51
wordpress plugin [widget] - show recent comments with category
<?php
/*
Plugin Name: Extended Commnets
Plugin URI: https://gist.github.com/gists/3479610
Description: wordpress plugin [widget] - show recent comments with category
Version: 0.1
Author: Tareq Jobayere
Author URI: http://twitter.com/tareq_jobayere
License: i don't know
*/
@tarex
tarex / Deploy your site with git.md
Last active July 18, 2016 18:09 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@tarex
tarex / Build an Amazon EC2 LAMP Server.md
Last active July 18, 2016 18:06 — forked from aronwoost/README.md
Build an Amazon EC2 LAMP Server

Launch the instance and connect with ssh.

##Update the server

sudo yum update

##Install php and MySQL packages

@sindresorhus
sindresorhus / post-merge
Last active July 25, 2024 06:53
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
<?php
/*
Plugin Name: Nav Menu Exporter and Importer
Description: Export and Import nav menus. Requires WordPress Importer plugin
Author: hissy, megumi themes
Version: 0.1
Text Domain: nav-menu-exporter-importer
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
@tarex
tarex / gulpfile.js
Created October 14, 2014 23:34
My gulp file
var gulp = require('gulp'),
plug = require("gulp-load-plugins")({lazy:false})
wiredep = require('wiredep').stream;
gulp.task('bower', function () {
gulp.src('app/index.html')
.pipe(wiredep())
.pipe(gulp.dest('app/'));
});
@rgaidot
rgaidot / docker-resources.md
Last active October 22, 2023 13:02
Docker Resources All In One - A collection of docker online resources
<?php
/**
* Plugin Name: Multiple Roles per User
* Description: Allows anyone who can edit users to set multiple roles per user. In a default WordPress environment that wouldn't have much of an effect, since the user would have the privileges of the top-privileged role that you assign to him. But if you have custom roles with custom privileges, this might be helpful.
* Version: 1
* Author: nikolov.tmw
* Author URI: http://paiyakdev.com/
* License: GPL2
*/
/*
# based on http://www.commandlinefu.com/commands/view/2916/backup-all-mysql-databases-to-individual-files
# but modified for the MAMP path and to include default root/root as username and password
for I in $(/Applications/MAMP/Library/bin/mysql -u root -proot -e 'show databases' -s --skip-column-names); do /Applications/MAMP/Library/bin/mysqldump -u root -proot $I | gzip > "$I.sql.gz"; done