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
/** | |
* GraphQL resolver for deleting uploaded media in Strapi | |
* extensions/upload/config/schema.graphql.js | |
*/ | |
module.exports = { | |
resolver: { | |
Mutation: { | |
deleteFile: { | |
description: 'Delete one file', | |
resolverOf: 'plugins::upload.upload.destroy', |
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
var dbName = 'DatabaseName'; | |
db.getSiblingDB(dbName).getCollectionNames().forEach(function(collName) { | |
if (!collName.startsWith("system.")) { | |
db[collName].drop(); | |
print('Dropped Collection: ' + collName); | |
} | |
}) |
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
#!/bin/bash | |
TARGET="<target-location>" | |
DEPLOY="<deployment-location>" | |
GIT_DIR="<repo-location>" | |
BRANCH="master" | |
while read oldrev newrev ref | |
do | |
# only checking out the master (or whatever branch you would like to deploy) | |
if [ "$ref" = "refs/heads/$BRANCH" ]; |
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
#!/bin/bash | |
TARGET="<deployment-location>" | |
GIT_DIR="<repo-location>" | |
BRANCH="master" | |
while read oldrev newrev ref | |
do | |
# only checking out the master (or whatever branch you would like to deploy) | |
if [ "$ref" = "refs/heads/$BRANCH" ]; | |
then |
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
import SwiftUI | |
class HostingController<ContentView: View>: UIHostingController<ContentView> { | |
override var preferredStatusBarStyle: UIStatusBarStyle { | |
return .lightContent // Set preferred status bar style here | |
} | |
} |
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
#!/bin/bash | |
counter=1 | |
key=catch-me-if-you-can | |
value=0 | |
while [[ $value != 000000000* ]] | |
do | |
value=$(echo -n $key+$counter | shasum -a 256) | |
echo $counter |