View web.config
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<location path="ForDownload" allowOverride="false" inheritInChildApplications="false"> | |
<system.webServer> | |
<security> | |
<authorization> | |
<!-- Allow all users access to the Public folder --> | |
<remove users="*" roles="" verbs="" /> | |
<add accessType="Allow" users="*" roles="" /> | |
</authorization> |
View SendMail.cs
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; |
View App.config
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> |
View gist:a8a110dc759e83e66966ee48dbcdedcd
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); |
View AppSettings.cs
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(); |
View WebClient.cs
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 |
View pgx.go
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() { |
View UnityExtensions.cs
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 | |
{ |
View restore.bash
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 |
View sshd_config
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 |
NewerOlder