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 | |
REM move into the backups directory | |
CD C:\data\backup | |
REM Create a file name for the database output which contains the date and time. | |
set CUR_YYYY=%date:~10,4% | |
set CUR_MM=%date:~4,2% | |
set CUR_DD=%date:~7,2% | |
set CUR_HH=%time:~0,2% |
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 "Target architectures: $ARCHS" | |
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}" | |
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK | |
do | |
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable) | |
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME" | |
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH" | |
echo $(lipo -info "$FRAMEWORK_EXECUTABLE_PATH") | |
FRAMEWORK_TMP_PATH="$FRAMEWORK_EXECUTABLE_PATH-tmp" | |
# remove simulator's archs if location is not simulator's directory |
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
func addPagingBehaviour() { | |
let willBeginDragging = collectionView.rx | |
.willBeginDragging.map({ [unowned self] result -> Int in | |
let pageWidth = UIScreen.main.bounds.width | |
let proportionalOffset = (self.collectionView.contentOffset.x ?? 0) / pageWidth | |
let indexOfCellBeforeDragging = Int(round(proportionalOffset)) | |
return indexOfCellBeforeDragging | |
}) | |
let willEndDragging = collectionView.rx.willEndDragging |
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
/** | |
* Calculate monthly payment for loan | |
* @param {amount} loan amount. | |
* @param {interest_rate} load interest rate. | |
* @param {months} number of months | |
* @returns {string} monthly payment | |
*/ | |
function computeLoan(amount, interest_rate, months) { | |
var interest = (amount * (interest_rate * 0.01)) / months; |
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 | |
for filename in ./input/*; do | |
mkdir -p "output/1242x2208/" | |
echo $(basename "$filename") | |
convert "$filename" -resize 1242x2208 "output/1242x2208/$(basename "$filename")" | |
echo "output/1242x2208/$(basename "$filename")" | |
mkdir -p "output/1242x2688/" | |
echo $(basename "$filename") |
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
sudo yum check-update | |
# Add the official Docker repository --> download the latest version of Docker --> install it: | |
curl -fsSL https://get.docker.com/ | sh | |
# start the Docker daemon | |
sudo systemctl start docker | |
# make docker starts as daemond: | |
sudo systemctl enable docker |
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 | |
mkdir -p output | |
pngimages=(./*.png) | |
jpgimages=(./*.jpg) | |
images=("${pngimages[@]}" "${jpgimages[@]}") | |
# iterate through array using a counter | |
for ((i=0; i<${#images[@]}-3; i++)); do |