Skip to content

Instantly share code, notes, and snippets.

View mcnaveen's full-sized avatar
🦄

Naveen MC mcnaveen

🦄
View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 18, 2024 18:38
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@gokulkrishh
gokulkrishh / media-query.css
Last active November 10, 2024 02:00
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
<?php
/*
Plugin Name: Woocommerce SMS Notification
Plugin URI: http://kohbeixian.com
Description: Woocommerce SMS Notification (BulkSMS and WooCommerce Marketplace)
Version: 1.0
Author: Xian
Author URI: http://kohbeixian.com
*/
@atifazad
atifazad / sysquit_commands.md
Last active August 15, 2024 07:18
osascript commands to shutdown, restart, sleep and logout mac

Shut down without showing a confirmation dialog:

osascript -e 'tell app "System Events" to shut down'

Shut down after showing a confirmation dialog:

osascript -e 'tell app "loginwindow" to «event aevtrsdn»'
@xlplugins
xlplugins / xlwcty_add_custom_action_thankyou.php
Last active September 28, 2020 20:35
Add custom javascripts or php action on WooCommerce Thank you page after order completes
<?php
/**
* This is a PHP code, so should be wrapped inside PHP
* Like we added here.
* If PHP is already open then don't include above <?php open tag
*/
/**
* Adding custom javascripts or php action on WooCommerce Thank you page
* Works with WooCommerce 3.0 or above
*/
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active November 18, 2024 21:25
crack activate Office on mac with license file
@vyspiansky
vyspiansky / set-default-category-for-custom-post-type.php
Created September 20, 2021 14:19
WordPress: how to set a default category for a custom post type
<?php
add_action('save_post', function($post_id, $post) {
$custom_post_type = 'custom-post-type';
$custom_taxonomy = 'custom-taxonomy';
$default_term_slug = 'default-term-slug';
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return;
// If this is just a revision, don't set default category
@mskian
mskian / umami.php
Last active January 29, 2023 16:34
Umami Wordpress - Add Umami Analytics Code in Wordpress Site - Add this below Code in your Site Specific Plugin or Themes Functions File.
function umami_preconnect_url(){
if(! is_user_logged_in()){
echo '<link rel="preconnect" href="https://umami.example.com" />';
}
}
add_action('wp_head', 'umami_preconnect_url');
function umami_track_code() {
if(! is_user_logged_in()){
?>