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
| # https://colab.research.google.com/drive/1xpvf6F7pPlwmQIOR_-_F2rN7KyQa-Tsl#scrollTo=PRwadWWMFiXh | |
| import csv | |
| import json | |
| input_file = 'export (1).csv' | |
| output_file = 'filtered_services.json' | |
| desired_columns = [ | |
| "IT teenuse nimi", | |
| "Lühinimi", | |
| "Lühikirjeldus", |
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
| # DEPENDS: .bashrc must include this file | |
| # LOAD CHANGES MANUALLY: source ~/.bash_aliases OR ~/.bash_aliases | |
| # LIST ALL ALIASES: alias | |
| #INFO MESSAGE | |
| echo -e "\e[1;34m.bash aliases LOADED" | |
| # VARIABLES | |
| export eis_user='firstname.lastname' | |
| export info_color='\e[1;34mINFO: ' |
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
| # cd ~/.local/share/nemo/actions | |
| # touch vscode.nemo_action | |
| # nano vscode.nemo_action | |
| [Nemo Action] | |
| Name=Open in VS Code | |
| Comment=Open in VS Code | |
| Exec=code "%F" | |
| Icon-Name=visual-studio-code | |
| Selection=Any |
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
| function adm_enqueue_custom_acf_color_picker_script() { | |
| //wp_enqueue_script('jquery'); // ACF filters requirement. If not working | |
| $eas_theme__colors = [ | |
| '#003cff', //light blue | |
| '#0000b4', //darker blue | |
| '#3c0078', //purple | |
| '#1d4432', //green | |
| '#fcedc5', //yellow |
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 | |
| //WHY THIS FILE? - Find templates fast and get better overview of a new project | |
| //Posts, Pages, CPT get columns: "template path" and "last modified" | |
| // Add custom columns | |
| function add_custom_columns($columns) { | |
| $columns['modified_date'] = 'Last Modified'; | |
| $columns['page_template'] = 'Page Template'; | |
| return $columns; | |
| } |
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
| <script> | |
| import { onMount } from "svelte"; | |
| let { posts } = $props(); | |
| let current = $state(0); | |
| let interval; | |
| onMount(() => { | |
| interval = setInterval(() => { | |
| current = (current + 1) % posts.length; |
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
| # NB! DO NOT USE add_page or add_sub_page for that | |
| # EXAMPLE: just use plugin main page and add request parameters | |
| global $wp; | |
| $query = add_query_arg( admin_url() , $wp->query_vars ); | |
| $edit_query = add_query_arg( array( | |
| 'page' => "plugin-page-home", | |
| 'car_id' => $car->id, | |
| 'work_id' => $work->id | |
| ), $query ); |
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 | |
| #Please note that project folder is one level from public_html (/../projects/laravel/) | |
| #Plese note that laravel public folder files must be in public_html (configure the location) | |
| #1 Remove storage folder in public_html/public/storage if you perfomed storage:link in local | |
| #2 Create a php file: mysymlink.php @ public_html folder | |
| #3 Add below codes to mysymlink.php file | |
| $targetFolder = $_SERVER['DOCUMENT_ROOT'].'/../projects/laravel/storage/app/public'; | |
| $linkFolder = $_SERVER['DOCUMENT_ROOT'].'/storage'; | |
| symlink($targetFolder,$linkFolder); |
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
| SELECT DISTINCT | |
| clients.papers_email_address, | |
| LEFT(clients.name , LOCATE(' ',clients.name) - 1) AS eesnimi_tyhikuni /* MARI TAMM -> MARI (täisnime hoitakse)*/ | |
| FROM | |
| policies | |
| LEFT JOIN clients ON clients.id = policies.client_id | |
| WHERE |
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
| SELECT | |
| renewals.start_date AS UUS_POLIIS_start_date | |
| ,policies.end_date AS EELMINE_POOLIIS_end_date | |
| ,renewals.id AS UUS_POLIIS_id | |
| ,policies.id AS EELMINE_POOLIIS | |
| ,DATEDIFF( renewals.start_date , policies.end_date ) AS DATE_DIFF | |
| FROM | |
| policies |
NewerOlder