Skip to content

Instantly share code, notes, and snippets.

View Spoygg's full-sized avatar

Ivan Ivanić Spoygg

View GitHub Profile
@Spoygg
Spoygg / 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).
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]:
@Spoygg
Spoygg / 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' );
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);
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
projekat
|-- partials
| |-- header.php
| +-- footer.php
|
|-- index.php
|-- gallery.php
|-- about.php
|-- founders.php
|
#!/bin/bash
case "$1" in
"IncsubVagrant") cd ~/IncsubProjects
echo "Bringing Vagrant up... "
vagrant up
fish
;;
"Upfront") cd ~/IncsubProjects/www/wordpress-default/wp-content/themes/upfront
echo "Checking out newest Upfront..."
git pull --rebase
javascript: (function() { var imageMaxWidth = 800; var parseForImages = function(node) { if (node.tagName === 'IMG' && node.width > imageMaxWidth) { node.style.maxWidth = imageMaxWidth + 'px'; return; } if (node.children) { for (var i = 0; i < node.children.length; i++) { parseForImages(node.children[i]); } } }; var messages = document.getElementsByClassName('adn'); for (var i = 0; i < messages.length; i++) { parseForImages(messages[i]); } })();
| |~upfront-gallery/
| | |+css/
| | |+img/
| | |~js/
| | | |~settings/
| | | | |-layout-panel.js
| | | | `-thumbnail-fields.js
| | | |~templates/
| | | | |-label-editor-template.html
| | | | |-label-selector-template.html