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
| #!/bin/bash | |
| # This is an example script which creates bind mounts to mount certain directories to the Synology Photos home directory | |
| # A potential use case would be: | |
| # you're having your own folder structure somewhere else, which you want Synology Photos to be aware of, | |
| # but you don't want to copy/move all the files to Photo's home directory (because as of right now, | |
| # Photos unfortunately only scans media in either "/volume1/homes/<user>/Photos" for personal storage | |
| # or "/volume1/photo" for shared storage |
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
| exiftool -overwrite_original ^ | |
| "-AllDates<${filename;m/IMG-(\d{4})(\d{2})(\d{2})/;$_=\"$1:$2:$3 12:00:00\"}" ^ | |
| "-FileModifyDate<${filename;m/IMG-(\d{4})(\d{2})(\d{2})/;$_=\"$1:$2:$3 12:00:00\"}" ^ | |
| "-FileCreateDate<${filename;m/IMG-(\d{4})(\d{2})(\d{2})/;$_=\"$1:$2:$3 12:00:00\"}" ^ | |
| IMG-*.jpg |
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
| #!/bin/bash | |
| # This is a small helper script that utilizes Exiftool to feed back metadata from a Google Photos Takeout Export's JSON sidecar format | |
| # into the original media files | |
| # Usage: ./migrate-takeout -i <input_dir> -o <output_dir> -e <exiftool_path> | |
| # Tells Bash to stop on errors if variables are unset | |
| set -eu |
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
| ; STM32 PlatformIO configuration file | |
| ; | |
| ; This is a kickstart example to get PlatformIO to work with a STM32CubeMX generated project, which eliminates the need of | |
| ; of the STM32CubeIDE. It also exclusively uses the driver files provided by CubeMX, rather than the outdated ones PlatformIO uses. | |
| ; | |
| ; The following steps get you started: | |
| ; 1. Open the STM32CubeMX tool, find your board/MCU, and create a new project. | |
| ; 2. Go to the "Project Manager" tab and set the following: | |
| ; | |
| ; Project > Toolchain / IDE : "Makefile" |
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
| @echo off | |
| :: Check for arguments | |
| IF [%1]==[] GOTO USAGE | |
| IF [%2]==[] GOTO USAGE | |
| IF [%3]==[] GOTO USAGE | |
| :: Arguments | |
| SET "input=%1" | |
| SET "inputName=%~n1" |
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
| // Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. | |
| using System; | |
| using UnrealBuildTool; | |
| using System.Diagnostics; | |
| public class BuildScriptUtils | |
| { | |
| // Runs p4.exe to determine the current changelist | |
| // Returns true if it could determine the changelist, false if not |
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
| <wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | |
| <s:Boolean x:Key="/Default/CodeInspection/Highlighting/IdentifierHighlightingEnabled/@EntryValue">True</s:Boolean></wpf:ResourceDictionary> |
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
| #!/bin/bash | |
| # Put your P4 credentials here! | |
| P4_IP="some.domain.com:1666" | |
| P4_USER=John | |
| P4_PASS=johndoe1234 | |
| rm -rf gource.log | |
| p4 -p $P4_IP -u $P4_USER -P $P4_PASS changes |awk '{print $2}'|p4 -p $P4_IP -u $P4_USER -P $P4_PASS -x - describe -s|awk '(/^Change / || /^... /) {if ($1 == "Change") {u=substr($4,1,index($4,"@")-1); t = $(NF-1) " " $NF; gsub("/"," ",t); gsub(":"," ",t);time=mktime(t);} else {if ($NF=="add") {c="A";} else if ($NF=="delete") {c="D";} else {c="M";};f=substr($2,3,index($2,"#")-3);print time "|" u "|" c "|" f;}}'|sort -n > gource.log |
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
| // Copyright 2019-2021 Jonathan Verbeek. All Rights Reserved. | |
| #include "Player/HeadBobComponent.h" | |
| UHeadBobComponent::UHeadBobComponent() | |
| { | |
| // Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features | |
| // off to improve performance if you don't need them. | |
| PrimaryComponentTick.bCanEverTick = true; |
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
| // DynamicTexture | |
| #include "DynamicTexture.h" | |
| // UTextures have a BPP of 4 (Red, Green, Blue, Alpha) | |
| #define DYNAMIC_TEXTURE_BYTES_PER_PIXEL 4 | |
| void UDynamicTexture::Initialize(int32 InWidth, int32 InHeight, FLinearColor InClearColor, TextureFilter FilterMethod/* = TextureFilter::TF_Nearest*/) | |
| { | |
| // Store the parameters |
NewerOlder