Skip to content

Instantly share code, notes, and snippets.

View jahid32's full-sized avatar

Md Mostafizur Rahman jahid32

  • Sourcetop Inc.
  • Bangladesh
View GitHub Profile
{
"bold_folder_labels": true,
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"default_line_ending": "unix",
"detect_indentation": false,
"draw_minimap_border": true,
"enable_tab_scrolling": true,
"enable_telemetry": "false",
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
/**
* Source: http://nicolasgallagher.com/micro-clearfix-hack/
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* contenteditable attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that are clearfixed.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.

SSL upgrades on rubygems.org and RubyInstaller versions

UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.


Hello,

If you reached this page, means you've hit this SSL error when trying to

@jahid32
jahid32 / filter_widget_class
Last active August 29, 2015 14:18
Filter widget class based on number of widget
/**
* [sidbar_widget_count count number of parameter in a sidbar]
* @param [string] $sidebar_id [sidbar_id]
* @return [int] [number of item]
*/
function sidbar_widget_count($sidebar_id){
$total_widgets = wp_get_sidebars_widgets();
return count($total_widgets[$sidebar_id]);
}
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);
#!/bin/bash
myproject='myproject'
mywww='public_html'
# initialize project
composer create-project laravel/laravel $myproject --prefer-dist
cd $myproject
# fix paths to public
@jahid32
jahid32 / DisableEditor
Last active August 29, 2015 14:26
Disable Visual editor form Author role.
// Disable Rictext editor only for author
function cp_disable_editor()
{
if( current_user_can( 'author' ) )
{
$user_ID = get_current_user_id();
update_user_meta( $user_ID, 'rich_editing', false );
}
}
add_action('admin_init','cp_disable_editor');
@jahid32
jahid32 / DB.sql
Created October 13, 2015 09:56 — forked from msurguy/DB.sql
Dynamic dropdown in Laravel, let's say you have multiple drop downs (selects), you click on one and the contents of the other need to be dynamically changed. One solution is to dynamically load JSON from the API and change the dropdown dynamically depending on the user choice.
CREATE TABLE `makers` (
`id` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
@jahid32
jahid32 / dabblet.css
Created May 31, 2016 10:04 — forked from csssecrets/dabblet.css
Translucent borders
/**
* Translucent borders
*/
body {
background: url('http://csssecrets.io/images/stone-art.jpg');
}
div {
border: 10px solid hsla(0,0%,100%,.5);