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
using System; | |
using System.Text; | |
using System.Net.Mail; | |
using System.IO; | |
using System.Linq; | |
using System.Collections.Generic; | |
using System.Net; | |
using System.Threading; | |
using System.Net.Mime; | |
using System.Diagnostics; |
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 logSW = new StreamWriter("output.txt", false); | |
logSW.AutoFlush = true; | |
Trace.Listeners.Add(new TextWriterTraceListener(logSW)); | |
Trace.Listeners.Add(new ConsoleTraceListener(true)); | |
<system.diagnostics> | |
<trace autoflush="true" indentsize="4"> | |
<listeners> |
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
using System; | |
using System.Net; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Calibration { | |
public static class Server { | |
public delegate void ProgressDelegate(int percents, long bytesReceived, long totalBytesToReceive); |
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
public static string GetSettings(string key) | |
{ | |
return ConfigurationManager.AppSettings[key] ?? ""; | |
} | |
public static void SetSetting(string key, string value) | |
{ | |
Configuration configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); | |
configuration.AppSettings.Settings[key].Value = value; | |
configuration.Save(); |
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
namespace AutogrammaLauncher | |
{ | |
using System; | |
using System.Net; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
public static class Server |
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
package main | |
import ( | |
"log" | |
"time" | |
"github.com/jackc/pgx" | |
) | |
func main() { |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Events; | |
using UnityEngine.EventSystems; | |
using UnityEngine.SceneManagement; | |
public static class UnityExtensions | |
{ |
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 | |
backupfile="pgsql_2019-08-06.sql.gz" | |
cd /data/pgbackup | |
gunzip -c ${backupfile} > restore.sql | |
systemctl stop aero | |
service postgresql restart | |
su postgres -c 'dropdb aerodb' | |
su postgres -c $'psql -f /data/pgbackup/restore.sql postgres' | |
systemctl restart aero | |
rm restore.sql |
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
# $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $ | |
# This is the sshd server system-wide configuration file. See | |
# sshd_config(5) for more information. | |
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin | |
# The strategy used for options in the default sshd_config shipped with | |
# OpenSSH is to specify options with their default value where | |
# possible, but leave them commented. Uncommented options override the |
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/sh | |
pathB=/data/pgbackup | |
dbUser=postgres | |
database=aerodb | |
mkdir -p $pathB | |
chmod 775 -R $pathB | |
find $pathB -mtime +61 -delete | |
su $dbUser -c "/usr/bin/pg_dumpall --database=$database | gzip > $pathB/pgsql_$(date -u "+%Y-%m-%d").sql.gz" |