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
(function() { | |
function setLicenseKey() { | |
localStorage.setItem('TM_useLicenseKey', 'your_license_key_here'); | |
console.log('TM_useLicenseKey has been set in local storage'); | |
const newChatButton = document.querySelector('[data-element-id="new-chat-button-in-side-bar"]'); | |
if (newChatButton && newChatButton.childNodes[1]) { | |
newChatButton.childNodes[1].textContent = 'License Key Set!'; | |
} | |
} |
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 | |
echo "This script will delete all your local Docker images! " | |
docker images | cut -c 45-59 |grep -v "IMAGE ID" > /tmp/images.names | |
for image in $(cat /tmp/images.names); do | |
docker rmi -f $image; | |
done |
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 | |
struct ContentView: View { | |
@State private var pickerSelectedIndex = 0 | |
@State private var toggleOn = false | |
@State private var textFieldValue = "" | |
var treats = Treat.demoTreats | |
var body: some View { |
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 | |
struct ContentView: View { | |
var body: some View { | |
List { | |
Section(header: Text("This is a Header"), footer: Text("This is a footer")) { | |
ForEach(0 ..< 5) { | |
Text("\($0)").tag($0) |
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 | |
struct ContentView: View { | |
let tips = ["Dream of mice", "Make some Origami", "Get the dog juggling", "Eating candies", "Sniffing weird stuff"] | |
var body: some View { | |
// Simple iteration where there list contains only a bunch of Strings | |
ForEach(tips, id: \.self) { tip in | |
VStack { |
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 body: some View { | |
VStack(alignment: .center) { | |
Image("paris") | |
.resizable() | |
.aspectRatio(contentMode: .fill) | |
.frame(width: 300) | |
.clipShape(Capsule()) | |
.opacity(0.9) | |
.overlay( |
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 | |
struct ContentView: View { | |
@State private var colorChange = false | |
@State private var sizeChange = false | |
var body: some View { | |
VStack(alignment: .center, spacing: 30) { |
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 | |
struct ContentView: View { | |
private var isActivatedMessage: String { | |
return "CatNip mode is " + (isActivated ? "Activated" : "Deactivated") | |
} | |
private var dateFormater: DateFormatter { | |
let dateFormater = DateFormatter() |
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 | |
struct ContentView: View { | |
@State private var orderCount = 0 | |
var body: some View { | |
VStack { | |
// Initializing a Stepper |
NewerOlder