Skip to content

Instantly share code, notes, and snippets.

View ebubekirbastama's full-sized avatar
🏠
Yaşamaya devam be Usta <hr>

Ebubekir Bastama ebubekirbastama

🏠
Yaşamaya devam be Usta <hr>
View GitHub Profile
using System;
using System.Text;
namespace EBSCoder
{
internal class EbsBase64Encoder
{
public string ConvertStringToBase64(string input)
{
string binaryRepresentation = ConvertStringToBinary(input);
void excellaktar()
{
Microsoft.Office.Interop.Excel.Application excel = new Microsoft.Office.Interop.Excel.Application
{
Visible = true
};
object Missing = Type.Missing;
Workbook workbook = excel.Workbooks.Add(Missing);
Worksheet sheet1 = (Worksheet)workbook.Sheets[1];
int StartCol = 1;
void excellaktar()
{
Microsoft.Office.Interop.Excel.Application excel = new Microsoft.Office.Interop.Excel.Application
{
Visible = false
};
object Missing = Type.Missing;
Workbook workbook = excel.Workbooks.Add(Missing);
Worksheet sheet1 = (Worksheet)workbook.Sheets[1];
int StartCol = 1;
//Ekran Görünbtüsü için kullanacağımız metod
public void EkranGoruntusuAl(IWebElement drv, string dosyaAdi)
{
Screenshot ekranGoruntusu = ((ITakesScreenshot)drv).GetScreenshot();
ekranGoruntusu.SaveAsFile(dosyaAdi + ".png");
}
@ebubekirbastama
ebubekirbastama / ebs.ps1
Created August 18, 2023 22:49
Elbette, aşağıda PowerShell kullanarak bir klasördeki .mp4 dosyalarının adlarında bulunan boşlukları ve özel karakterleri kaldıran bir betik örneği bulabilirsiniz:
$sourceFolder = "Klasör Yolu"
# List all .mp4 files in the source folder
$mp4Files = Get-ChildItem -Path $sourceFolder -Filter *.mp4
# Loop through each .mp4 file and rename
foreach ($file in $mp4Files) {
$newFileName = $file.Name -replace '\s+', '_' -replace '[^\w\d_.-]', ''
$newFilePath = Join-Path -Path $sourceFolder -ChildPath $newFileName
SoundPlayer player = new SoundPlayer(Application.StartupPath + "\\" + "ebsclikc.wav");
player.Play();
using System;
using System.Diagnostics;
class Program
{
static void Main()
{
// İşlemi başlatma
Process process = new Process();
process.StartInfo.FileName = "notepad.exe";
using NetFwTypeLib;
Type tNetFwPolicy2 = Type.GetTypeFromProgID("HNetCfg.FwPolicy2");
INetFwPolicy2 fwPolicy2 = (INetFwPolicy2)Activator.CreateInstance(tNetFwPolicy2);
var currentProfiles = fwPolicy2.CurrentProfileTypes;
INetFwRule firewallRule = fwPolicy2.Rules.OfType<INetFwRule>().Where(
x => x.Name == textBoxX2.Text)
.FirstOrDefault(); // Eklemek istediğiniz kuralın kayıtlı olup olmadığını kontrol ediyoruz
if (firewallRule == null)
using System;
using System.Collections;
using System.Windows.Forms;
namespace Space_Clear
{
public partial class Form1 : Form
{
public Form1()
{
private void listBox1_KeyDown(object sender, KeyEventArgs e)
{
//Bu örnek ile listbox'a copy Paste ile veri ekleyebilirsiniz.
//www.ebubekirbastama.com
//Abone ol:https://t.co/wZznpvQ7Ti
if (e.Control && e.KeyCode == Keys.V)
{
string clipboardText = Clipboard.GetText(); // Panodaki metni al
if (!string.IsNullOrEmpty(clipboardText))