Skip to content

Instantly share code, notes, and snippets.

@joymon
joymon / dump.aspx
Created April 18, 2019 14:08
ASP.Net test page to dump all the request and environment for debugging
<%@ Page Language="C#" AutoEventWireup="true" Trace="true" TraceMode="SortByCategory" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>ASP.NET Diagnostic Page</title>
</head>
<body>
<form id="form1" runat="server">
<%
void DumpIdentityAsTable(object identity)
@shikendon
shikendon / uptimerobot_discord.js
Last active April 21, 2021 11:52
Uptime Robot Discord integrations
// Alert Contact Type: Web-Hooks
// URL to Notify: https://discordapp.com/api/webhooks/{WEB_HOOK_ID}/{TOKEN}?
// POST Value (JSON Format):
{
"content": "Monitor is *alertTypeFriendlyName*: *monitorFriendlyName* ( *monitorURL* )\n```*alertDetails*```"
}
@TomTasche
TomTasche / nginx.conf
Last active January 27, 2023 21:22
config for nginx to proxy a specific path to an S3 bucket
# copied from default config
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@kekru
kekru / add CA cert on CentOS Debian Ubuntu.md
Last active October 23, 2023 08:21
Add CA cert to local trust store on CentOS, Debian or Ubuntu
  • Open a webpage that uses the CA with Firefox
  • Click the lock-icon in the addressbar -> show information -> show certificate
  • the certificate viewer will open
  • click details and choose the certificate of the certificate-chain, you want to import to CentOS
  • click "Export..." and save it as .crt file
  • Copy the .crt file to /etc/pki/ca-trust/source/anchors on your CentOS machine
  • run update-ca-trust extract
  • test it with wget https://thewebsite.org
@esamattis
esamattis / .gitignore
Created September 7, 2016 10:42 — forked from salcode/.gitignore
.gitignore file for WordPress - Bare Minimum Git
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
@noelboss
noelboss / git-deployment.md
Last active May 2, 2024 15:47
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@olih
olih / jq-cheetsheet.md
Last active May 3, 2024 17:42
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@makenova
makenova / pritunlMigration.md
Last active April 20, 2024 21:50
move pritunl between servers

Migrating your pritunl install between servers

This is a small write up about how to migrate your pritunl install between servers. It's not especially detailed because I'm lazy and your migration story will most likely be different. All this can be avoided by using a remote/hosted mongo instance(compose.io, mongolab, etc.) and simply pointing your pritunl instance at that. If you want more details ask, and I'll do my best to answer and update this write-up accordingly. Also, feel free to criticize my grammar and spelling.

@nl5887
nl5887 / transfer.fish
Last active March 22, 2022 09:07
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
@trusktr
trusktr / DefaultKeyBinding.dict
Last active April 21, 2024 06:32
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers