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 java.io.BufferedReader; | |
| import java.io.BufferedWriter; | |
| import java.io.FileReader; | |
| import java.io.FileWriter; | |
| public class main { | |
| public static void main (String[] args) throws Exception { | |
| BufferedReader file = new BufferedReader(new FileReader("C:\\work\\Java\\in.txt")); | |
| BufferedWriter out = new BufferedWriter(new FileWriter("C:\\work\\Java\\out.txt")); |
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
| function Execute-HTTPRequestCommand() { | |
| param( | |
| [string] $url = "http://teamcity-server", | |
| [string] $username = "user", | |
| [string] $password = "password" | |
| ) | |
| $authInfo = $username + ":" + $password | |
| $authInfo = [System.Convert]::ToBase64String([System.Text.Encoding]::Default.GetBytes($authInfo)) | |
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 os | |
| import shutil | |
| def disk_usage(path): | |
| st = os.statvfs(path) | |
| free = st.f_bavail * st.f_frsize | |
| total = st.f_blocks * st.f_frsize | |
| percenage = (100 * free) / total | |
| return percenage |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace CleanCache { | |
| public static class Program { | |
| static void Main(string[] args) { |
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
| # -*- coding: utf-8 -*- | |
| import sys, os, time | |
| import urllib2 | |
| import shutil | |
| import subprocess | |
| #import wmi_client_wrapper as wmi | |
| from urllib2 import URLError | |
| def restart_service(name): |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace ConsoleApplication1 | |
| { | |
| public class ShowDirSize |
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
| #!/usr/bin/python | |
| import os, sys, time | |
| import urllib2 | |
| from urllib2 import URLError | |
| from email.mime.multipart import MIMEMultipart | |
| from email.mime.text import MIMEText | |
| link = 'http://new.sdo.rzd.ru/lms/status.jsp' | |
| try: |
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
| #!/usr/bin/python | |
| import smtplib | |
| import os, sys, time | |
| import imaplib, email | |
| from email.mime.multipart import MIMEMultipart | |
| from email.mime.text import MIMEText | |
| fromaddr = "noreply1@mail.ru" |
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
| package mailer; | |
| import javax.mail.*; | |
| import javax.mail.internet.InternetAddress; | |
| import javax.mail.internet.MimeMessage; | |
| import java.util.Properties; | |
| /** | |
| * Created by mdordzhiev on 24.08.2016. | |
| */ |
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
| package calculate; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| /** | |
| * Created by vvvd on 21.08.2016. | |
| */ | |
| public class Solution { |
NewerOlder