https://sdl-training.ssl.cdn.sdlmedia.com/image/636021066519637022TW.jpg
This file contains 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
/** | |
* Blink for Node MCU | |
* also see https://arduino.stackexchange.com/questions/38477/does-the-node-mcu-v3-lolin-not-have-a-builtin-led | |
* | |
* Turns on an LED on for one second, | |
* then off for one second, repeatedly. | |
*/ | |
#include "Arduino.h" | |
// On a NodeMCU board the built-in led is on GPIO pin 2 |
This file contains 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
@EnableScheduling | |
@Component | |
public class ScheduledTasks { | |
private static final Logger LOGGER = LoggerFactory.getLogger(ScheduledTasks.class); | |
private static boolean needToRunStartupMethod = true; | |
@Scheduled(fixedRate = 3600000) | |
public void keepAlive() { |
This file contains 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
package org.example; | |
import com.sdl.webapp.common.api.WebRequestContext; | |
import com.sdl.webapp.common.api.content.ContentProvider; | |
import com.sdl.webapp.common.api.content.ContentProviderException; | |
import com.sdl.webapp.common.api.localization.Localization; | |
import com.sdl.webapp.common.api.localization.LocalizationResolver; | |
import com.sdl.webapp.common.api.model.PageModel; | |
import lombok.extern.slf4j.Slf4j; | |
import org.example.controller.SwitchController; |
This file contains 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
/* The queries below use data in a temp table, so at a minimum execute the queries for the temp table, and then use one or more of the queries on the BINARY table */ | |
/*** CREATE THE TEMP TABLE ***/ | |
/* Clear the temp table to be sure */ | |
If(OBJECT_ID('tempdb..#CURRENT_ITEM_BINARIES') Is Not Null) | |
Begin | |
Drop Table #CURRENT_ITEM_BINARIES | |
End | |
/* figure out which binaries are used by current (not old) versions of items */ |
This file contains 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 database size */ | |
SELECT DB_NAME(db.database_id) DatabaseName, | |
(CAST(mfrows.RowSize AS FLOAT)*8)/1024 RowSizeMB, | |
(CAST(mflog.LogSize AS FLOAT)*8)/1024 LogSizeMB, | |
(CAST(mfstream.StreamSize AS FLOAT)*8)/1024 StreamSizeMB, | |
(CAST(mftext.TextIndexSize AS FLOAT)*8)/1024 TextIndexSizeMB | |
FROM sys.databases db | |
LEFT JOIN (SELECT database_id, SUM(size) RowSize FROM sys.master_files WHERE type = 0 GROUP BY database_id, type) mfrows ON mfrows.database_id = db.database_id | |
LEFT JOIN (SELECT database_id, SUM(size) LogSize FROM sys.master_files WHERE type = 1 GROUP BY database_id, type) mflog ON mflog.database_id = db.database_id | |
LEFT JOIN (SELECT database_id, SUM(size) StreamSize FROM sys.master_files WHERE type = 2 GROUP BY database_id, type) mfstream ON mfstream.database_id = db.database_id |
This file contains 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
@Controller | |
public class MyPageController { | |
// Inject the PageController, because we cannot override and change the RequestMapping | |
@Autowired | |
private PageController pageController; | |
// This mapping is more specific than the DXA PageController mapping | |
@RequestMapping( | |
value = {"/**"}, |
This file contains 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
<# | |
Start the year with a fresh, empty mailbox. | |
This scripts moves emails from the Inbox (default folder) in a date range to another folder. | |
Set $filterFromDate and $filterToDate to select the date range of mails to move. | |
Set $tagetFolderName to the folder to move the mails to. | |
Inspired by https://social.technet.microsoft.com/Forums/scriptcenter/en-US/5dc36dec-f88f-4e2d-8cba-385b6204ef6c/powershell-and-outlook-moving-messages?forum=ITCG | |
and https://msdn.microsoft.com/en-us/magazine/dn189202.aspx | |
#> |
This file contains 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
<appSettings> | |
<!-- Disable browserlink, it causes unnecessary calls to the content service --> | |
<add key="vs:EnableBrowserLink" value="false" /> | |
</appSettings> |
This file contains 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
# based on the script in this post | |
# https://weblog.west-wind.com/posts/2017/May/25/Automating-IIS-Feature-Installation-with-Powershell#AdditionalIISFeatures | |
# | |
# and the list of default IIS options from | |
# https://www.howtogeek.com/112455/how-to-install-iis-8-on-windows-8/ | |
# and http://nl.tinypic.com/r/29z6kvs/9 | |
# | |
# and a hint from https://gist.github.com/yetanotherchris/c51757d221eecb150867b7b113d227e8 |