I recently found a nice emacs-mode, [irony-mode], which can be used with [company-mode], [flycheck-mode], and [eldoc-mode]. It works nicely with CMake-based projects. The document contains a list of instructions for setting things up. I assume that you're using a fresh-installed Ubuntu-12.04.5 (64-bit). It uses [Lean theorem prover][lean] as an example project.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;; org-capture-demo.el --- Org capture demo configuration. | |
| ;;; Commentary: | |
| ;;; Author: Suvrat Apte | |
| ;;; Created on: 03 May 2020 | |
| ;;; Copyright (c) 2019 Suvrat Apte <[email protected]> | |
| ;; This file is not part of GNU Emacs. | |
| ;;; License: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This function helps to understand scripts loading sequence for 'WooCommerce Admin' plugin | |
| * @author Khan Mohammad R. <[email protected]> | |
| * @return void | |
| */ | |
| function codemascot_get_scripts_on_loading_sequence_for_wc_admin() { | |
| // JS Scripts part | |
| global $wp_scripts; | |
| $t = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Wrapper function for custom language switcher | |
| * | |
| * @author Khan Mohammad R. <[email protected]> | |
| * @return void | |
| * @throws NonexistentTable | |
| */ | |
| function wco_nrskn_lng_switcher() { |
zip -r cvision.zip cvision -x "cvision/node_modules/*" "cvision/.git/*" "cvision/gruntfile.js" "cvision/package.json" "cvision/package-lock.json" "cvision/.gitignore" "cvision/assets/scss/*" "cvision/.sass-cache/*"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DELETE a,b,c | |
| FROM {PREFIX}_posts a | |
| LEFT JOIN {PREFIX}_term_relationships b ON (a.ID = b.object_id) | |
| LEFT JOIN {PREFIX}_postmeta c ON (a.ID = c.post_id) | |
| WHERE a.post_type IN ('POST_TYPE_1', 'POST_TYPE_2') AND a.post_date < '2014-01-01'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Initiating shortcode. Place this code to any of your page to get your desired output. | |
| add_shortcode( 'faq_page_content', 'the_dramatist_faq_page_content'); | |
| /** | |
| * Rendering function | |
| */ | |
| function the_dramatist_faq_page_content() { | |
| echo '<ul>'; | |
| $posts = get_posts( | |
| array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| noun = [ 'বই', 'book1', 'book2' ] | |
| print noun | |
| # Will print ['\xe0\xa6\xac\xe0\xa6\x87', 'book1', 'book2'] | |
| print repr(noun).decode('unicode-escape').encode('latin-1') | |
| # Will print ['বই', 'book1', 'book2'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UPDATE wp_posts p | |
| JOIN wp_term_relationships r | |
| ON r.object_id = p.id | |
| JOIN wp_terms t | |
| ON r.term_taxonomy_id = t.term_id | |
| JOIN wp_term_taxonomy x | |
| ON r.term_taxonomy_id = x.term_taxonomy_id | |
| SET p.post_content = CASE | |
| WHEN t.name = 'ACategory' THEN REPLACE(post_content, 'http://sitename.com/FileID/filename.zip', | |
| 'http://sitename.com/FileID/ACategory-filename.zip') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| <?php | |
| function delete_post(){ | |
| global $post; | |
| $deletepostlink= add_query_arg( 'frontend', 'true', get_delete_post_link( get_the_ID() ) ); | |
| if (current_user_can('edit_post', $post->ID)) { | |
| echo '<span><a class="post-delete-link" onclick="return confirm(\'Are you sure to delete?\')" href="' . $deletepostlink . '">Delete this </a></span>'; | |
| } |
NewerOlder