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; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.Text; | |
| using JetBrains.Annotations; | |
| using Newtonsoft.Json; | |
| using Newtonsoft.Json.Converters; |
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
| # Configuration file for runtime kernel parameters. | |
| # See sysctl.conf(5) for more information. | |
| # See also http://www.nateware.com/linux-network-tuning-for-2013.html for | |
| # an explanation about some of these parameters, and instructions for | |
| # a few other tweaks outside this file. | |
| # | |
| # See also: https://gist.github.com/kgriffs/4027835 | |
| # | |
| # Assumes a beefy machine with lots of network bandwidth |
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
| async function addToCache(urls) { | |
| const pageCache = await window.caches.open('page-cache'); | |
| await pageCache.addAll(urls); | |
| } | |
| // Check that service workers are registered | |
| if ('serviceWorker' in navigator) { | |
| // Use the window load event to keep the page load performant | |
| window.addEventListener('load', () => { | |
| addToCache(['/hello-world/', '/main-page/']); |
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
| CREATE SEQUENCE public.global_id_seq; | |
| ALTER SEQUENCE public.global_id_seq OWNER TO postgres; | |
| CREATE OR REPLACE FUNCTION public.id_generator() | |
| RETURNS bigint | |
| LANGUAGE 'plpgsql' | |
| AS $BODY$ | |
| DECLARE | |
| our_epoch bigint := 1314220021721; | |
| seq_id bigint; |
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/sh bash | |
| #amzn linux2 humhub | |
| export HOST_NAME=xxxxxxxx.staging.kiwamu.work | |
| export HUMHUB_VERSION=1.4.3 | |
| export HUMHUB_DB_NAME='humhub' | |
| export HUMHUB_DB_USER='humhub' | |
| export HUMHUB_DB_PASSWORD='secret_password' |
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/env bash | |
| # wordpress Amazon Linux2 | |
| export OS_USER='ec2-user' | |
| #export OS_PASSWORD='' | |
| export TITLE='xxxxxxxx' | |
| export URL='https://xxxxxxxx.staging.kiwamu.work' | |
| export CN='*.xxxxxxxx.staging.kiwamu.work' | |
| export ADMIN_USER='wpmaster' | |
| export ADMIN_PASSWORD='secret_password' | |
| export ADMIN_EMAIL='root@localhost.localdomain' |
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/env bash | |
| echo "mastodon.example.com" | sudo tee /etc/hostname > /dev/null | |
| sudo localectl set-locale LANG=en_US.UTF-8 | |
| sudo timedatectl set-timezone Asia/Tokyo | |
| sudo tee /etc/sysctl.d/ipv4-tuning.conf << EOF | |
| # Drop it so lack of FIN times out quicker | |
| net.ipv4.tcp_fin_timeout = 30 | |
| # reuse TIME-WAIT sockets | |
| net.ipv4.tcp_tw_reuse = 1 | |
| net.ipv4.tcp_tw_recycle = 1 |
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/env powershell -File | |
| # * Make sure you run this script from a Powershel Admin Prompt! | |
| # * Make sure Powershell Execution Policy is bypassed to run these scripts: | |
| # * YOU MAY HAVE TO RUN THIS COMMAND PRIOR TO RUNNING THIS SCRIPT! | |
| Set-ExecutionPolicy Bypass -Scope Process -Force | |
| wmic computersystem set AutomaticManagedPagefile=False | |
| wmic pagefileset delete | |
| Stop-Service -Name ShellHWDetection |
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; | |
| using System.Threading.Tasks; | |
| using Microsoft.Bot.Builder; | |
| using Microsoft.Data.Sqlite; | |
| using Newtonsoft.Json; |