Skip to content

Instantly share code, notes, and snippets.

View mhasan3's full-sized avatar
🎯
Focusing

Mahmudul Hasan mhasan3

🎯
Focusing
View GitHub Profile
@kitek
kitek / gist:1579117
Created January 8, 2012 17:50
NodeJS create md5 hash from string
var data = "do shash'owania";
var crypto = require('crypto');
crypto.createHash('md5').update(data).digest("hex");
@helen
helen / repeatable-fields-metabox.php
Created January 11, 2012 04:42
Repeating Custom Fields in a Metabox
<?
/**
* Repeatable Custom Fields in a Metabox
* Author: Helen Hou-Sandi
*
* From a bespoke system, so currently not modular - will fix soon
* Note that this particular metadata is saved as one multidimensional array (serialized)
*/
function hhs_get_sample_options() {
@parth1020
parth1020 / Google Maps Simple Multiple Marker Example
Created January 8, 2013 07:04
Google Maps Simple Multiple Marker Example
<html>
<head>
<title>Google Maps Multiple Markers</title>
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
</head>
<body>
<div id="map" style="height: 400px; width: 500px;">
</div>
<script type="text/javascript">
@derhuerst
derhuerst / intro.md
Last active November 14, 2024 12:19
Installing Git on Linux, Mac OS X and Windows
@probaldhar
probaldhar / gist:58881beccad8f263325a
Last active March 30, 2016 08:16
How to Make an OS X Yosemite Boot Installer USB Drive
1. Download the "Install OS X Yosemite.app" form App Store and keep it in Applications Folder
2. Open the Terminal and just hit the command
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Yosemite.app --nointeraction
Then It will show the Following message
"Erasing Disk: 0%... 10%... 20%... 30%...100%...
Copying installer files to disk...
@laradevitt
laradevitt / d8module.install
Last active June 17, 2023 14:17
(Drupal 8) Create a table in a database other than the default during module installation. Database must already be specified in settings.php.
<?php
/**
* @file
* Install, update and uninstall functions for the d8module module.
*/
function d8module_schema_otherdb() {
$schema['mytable'] = array(
'description' => 'My table description',
`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'];
{
"type": "email",
"customer": {
"email": "{{customer.email}}",
"firstName":"{{customer.firstName}}",
"lastName":"{{customer.lastName}}"
},
"subject": "Low NPS rating from customer {{customer.firstName}} {{customer.lastName}}",
"mailbox": {
"id": MAILBOX-ID