Skip to content

Instantly share code, notes, and snippets.

View ivan-ivanic-cm's full-sized avatar

Ivan Ivanić ivan-ivanic-cm

  • 10up
  • novi sad, serbia
  • 00:56 (UTC +01:00)
View GitHub Profile
Straightforward shit
8.Čovek koji živi u srednjoj kući pije mleko.
9.U prvoj kući zivi Norvežanin.
14.Norvežanin živi pored plave kuće.
4.Levo od bele kuce se nalazi zelena. - jedina dva mesta gde mogu ove dve da se stave a da ispod bude i kafa kao piće je skroz desno
5.Covek koji je u zelenoj kući pije kafu.
1.Britanac živi u crvenoj kući. - ostala je samo jedna kombinacija kuća/vlasnik prazna
add_filter( 'woocommerce_currencies', 'add_my_currency' );
function add_my_currency( $currencies ) {
$currencies['ABC'] = __( 'Srpski dinar', 'woocommerce' );
return $currencies;
}
add_filter('woocommerce_currency_symbol', 'add_my_currency_symbol', 10, 2);
@ivan-ivanic-cm
ivan-ivanic-cm / Add-WordPress-Dashboard-Widget.php
Created August 6, 2019 09:16 — forked from SalmanRavoof/Add-WordPress-Dashboard-Widget.php
Add a custom widget to your WordPress dashboard.
// Add a new widget to the dashboard using a custom function
function wpmudev_add_dashboard_widgets() {
wp_add_dashboard_widget(
'wpmudev_dashboard_widget', // Widget slug
'My Custom Dashboard Widget', // Widget title
'wpmudev_new_dashboard_widget_function' // Function name to display the widget
);
}
// Register the new dashboard widget with the 'wp_dashboard_setup' action
add_action( 'wp_dashboard_setup', 'wpmudev_add_dashboard_widgets' );
context:
edit
attributes[pickedContent][id]:
1866
attributes[pickedContent][title]:
Managing Availability in Service Based Deployments with Continuous Testing
attributes[pickedContent][url]:
https://sf-engineering.test/managing-availability-in-service-based-deployments-with-continuous-testing-61be968da4a/
attributes[pickedContent][type]:
@ivan-ivanic-cm
ivan-ivanic-cm / sync_with_history.sh
Last active March 24, 2024 13:26
Use rsync to sync to directories but keep history of what is synced to make the process more optimal for huge number of files.
#!/bin/bash
#
# Sync two directories with rsync, but keep history to optimize the process.
# On subsequent runs it will only sync files added since last sync.
# This allows an easy continue in case script is interupted.
# This also helps with network connectivity to remotes since each file is
# transfered by initiating new rsync command. This solves one issue I have
# faced when syncing large number of files and that is connection breaking
# if the process takes to long (in my case it was about 10hrs to transfer all
# the files).