Skip to content

Instantly share code, notes, and snippets.

View ishaadX's full-sized avatar
🎯
Focusing

ishtiaque-shaad ishaadX

🎯
Focusing
View GitHub Profile
@kkirsche
kkirsche / Install Composer to use MAMP's PHP.md
Last active January 30, 2024 02:30
How to install Composer globally using MAMP's PHP

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line:

@hissy
hissy / nav-menu-exporter-importer.php
Last active October 9, 2024 00:33
[WordPress Plugin] Nav Menu Exporter and Importer / Export and Import nav menus. Requires WordPress Importer plugin.
<?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
*/
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@probaldhar
probaldhar / gist:82eff5fdc7b6035a92e5
Created June 29, 2015 06:02
How to make bootable Mac OS X
Follow these steps that in the link
http://www.macworld.co.uk/how-to/mac/make-bootable-mac-os-x-1010-yosemite-install-drive-3575875/

Assert:

এই মডিউল টি অ্যাপ্লিকেশনের ইউনিট টেস্ট লেখার জন্য ইউজ করা হয়। এটিকে অ্যাকসেস করা হয়:

require('assert')

Buffer:

@ishaadX
ishaadX / index.html
Last active September 20, 2015 08:33 — forked from finnp/index.html
Simple Todo-App using AngularJS (http://angularjs.org/) and Parse (https://parse.com/). Done at the HelsinkiJS #PeerProgramming. http://helsinkijs.org/
<!doctype html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.min.js"></script>
<script src="http://www.parsecdn.com/js/parse-1.2.7.min.js"></script>
<script src="todo.js"></script>
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
</head>
<body>
<div class="container" ng-controller="Todo">
`class Custom_Pages_Widgets extends WP_Widget{
public function __construct(){
$widget_ops = array(
'description' => __( "A list of your site’s Pages." )
);
parent::__construct( 'custom_widget_pages', __( 'Widget Pages' ), $widget_ops );
}
public function widget( $args, $instance ){
extract($args);
$select = empty( $instance['select'] ) ? '' : $instance['select'];
@mattheu
mattheu / block.js
Created April 18, 2018 09:41
Gutenberg - Test case custom block for passing content to render callback
const el = wp.element.createElement,
registerBlockType = wp.blocks.registerBlockType,
InnerBlocks = wp.blocks.InnerBlocks;
registerBlockType( 'gutenberg-boilerplate-es5/hello-world-step-01', {
title: 'Hello World (Step 1)',
icon: 'universal-access-alt',
category: 'layout',