EXIM – Email Terminal Commands

Show queue count : exim -bpc stop exim service : service exim stop start exim service : service exim restart clear all email files exim -bp | awk ‘{print $3}’ | xargs exim -Mrm – removing *

GIT add new remote to bitbucket

git remote add origin https://username@bitbucket.org/username/reponame.git git add git commit git push –set-upstream origin master

Published
Categorized as GIT

React Native Simulator – Specify Device

Run these commands inside your React Native project to specify a particular iOS device react-native run-ios –simulator=”iPhone 5s” react-native run-ios –simulator=”iPhone 6″ react-native run-ios –simulator=”iPhone 6 Plus” react-native run-ios –simulator=”iPhone 6s” react-native run-ios –simulator=”iPhone 6s Plus” react-native run-ios –simulator=”iPhone 7″ react-native run-ios –simulator=”iPhone 7 Plus” react-native run-ios –simulator=”iPhone 8″ react-native run-ios –simulator=”iPhone 8 Plus” react-native… Continue reading React Native Simulator – Specify Device

Toggle class in jQuery

jQuery(document).on(‘click’,’.replyPost, .cancelPost’, function(){ jQuery(this).toggleClass(“cancelPost replyPost”); });

Published
Categorized as jQuery

Laravel Database Column Types

Command Description $table->bigIncrements(‘id’); Incrementing ID (primary key) using a “UNSIGNED BIG INTEGER” equivalent. $table->bigInteger(‘votes’); BIGINT equivalent for the database. $table->binary(‘data’); BLOB equivalent for the database. $table->boolean(‘confirmed’); BOOLEAN equivalent for the database. $table->char(‘name’, 4); CHAR equivalent with a length. $table->date(‘created_at’); DATE equivalent for the database. $table->dateTime(‘created_at’); DATETIME equivalent for the database. $table->dateTimeTz(‘created_at’); DATETIME (with timezone) equivalent… Continue reading Laravel Database Column Types

PHP illegal string offset warning

Ran across the PHP Joomla warning after upgrading one of my apps to Joomla 3.45: Warning: Illegal string offset ‘name’ in function golfLeagueShowFormats($formatObject){ $delimiter = “,”; $format_array = explode($delimiter, $formatObject); foreach ($format_array as $format) { $formatnumber = $format[‘name’]; golfLeagueGetFormatName($formatnumber); //return ‘poop’; } } It’s just a warning that only shows up in developer mode. Disabling… Continue reading PHP illegal string offset warning

Put WordPress Widget Inside Post or Page Via Shortcode

Below WordPress function to show a widget via wordpress shortcode. You can use this to put a widget inside of a post, page, or even a widget. function widget($atts) { global $wp_widget_factory; extract(shortcode_atts(array( ‘widget_name’ => FALSE ), $atts)); $widget_name = esc_html($widget_name); if (!is_a($wp_widget_factory->widgets[$widget_name], ‘WP_Widget’)): $wp_class = ‘WP_Widget_’.ucwords(strtolower($class)); if (!is_a($wp_widget_factory->widgets[$wp_class], ‘WP_Widget’)): return ‘<p>’.sprintf(__(“%s: Widget class not… Continue reading Put WordPress Widget Inside Post or Page Via Shortcode