Skip to content

Instantly share code, notes, and snippets.

View nacm's full-sized avatar
🧪
Auto pilot

Ahmed Naseem nacm

🧪
Auto pilot
View GitHub Profile
@zubaer-ahammed
zubaer-ahammed / Reset MySQL Root Password in Mac OS.md
Last active April 4, 2024 10:38
Reset MySQL Root Password in Mac OS

Reset mysql root password in Mac OS:

First Stop MySQL:

  1. Go to: 'System Preferences' >> 'MySQL' and stop MySQL

OR,

  1. sudo /usr/local/mysql/support-files/mysql.server start
  2. sudo /usr/local/mysql/support-files/mysql.server stop
@tbranyen
tbranyen / _usage.md
Last active April 19, 2024 12:24
OpenWeatherMap / Weather Icons integration
  1. Include Weather Icons in your app: https://github.com/erikflowers/weather-icons

  2. Include the below JSON in your application, for example purposes, lets assume it's a global named weatherIcons.

  3. Make a request to OpenWeatherMap:

req = $.getJSON('http://api.openweathermap.org/data/2.5/weather?q=London,uk&callback=?');
@thecodepoetry
thecodepoetry / functions.php
Last active March 22, 2018 21:06
Dynamic page layout management
add_action( 'get_header', 'dt_archive_layout', 10 );
function dt_archive_layout() {
$config = Presscore_Config::get_instance();
if( is_archive() || is_category() || is_search() ){
$config->set( 'template.columns.number', '5' );
$config->set( 'post.preview.width.min', '200' );
$config->set( 'image_layout', 'resize' );