Skip to content

Instantly share code, notes, and snippets.

@davidfowl
davidfowl / dotnetlayout.md
Last active May 3, 2024 08:40
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@efrecon
efrecon / run.tpl
Last active May 3, 2024 08:39
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@MeguminSama
MeguminSama / Discord Experiments.js
Last active May 3, 2024 08:39
Discord Experiments.js
let cache; webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=r.c]);
var UserStore = Object.values(cache).find(m => m?.exports?.default?.getUser).exports.default;
var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes);
var user = UserStore.getCurrentUser();
actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
});
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";
@gmolveau
gmolveau / flask_gunicorn_download_fails_30s.md
Created May 3, 2024 08:24
flask/gunicorn/apache2 download/upload fails/closes/stops after 30 seconds

flask/gunicorn/apache2 download/upload fails/closes/stops after 30 seconds

Keywords : flask, gunicorn, apache2, send_file, werkzeug, requests, httpx, curl

Errors encountered

  • curl: (18) transfer closed with 9895632 bytes remaining to read
  • urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(206700544 bytes read, 789007589 more expected)', IncompleteRead(206700544 bytes read, 789007589 more expected))
  • httpcore.RemoteProtocolError: peer closed connection without sending complete message body (received 290521088 bytes, expected 995708133)
@oliviermartin
oliviermartin / arm-foundation-software-stack.md
Last active May 3, 2024 08:35
ARM Foundation Model - Build and Run reference ARM-64bit Software stack for free
@nfsarmento
nfsarmento / nginx-wordpress.conf
Last active May 3, 2024 08:34
Harden wordpress security nginx
############ WordPress ####################
# Disable logging for favicon and robots.txt
location = /favicon.ico {
try_files /favicon.ico @empty;
access_log off;
log_not_found off;
expires max;
}
@Kfokam48-056
Kfokam48-056 / hello.c
Last active May 3, 2024 08:34
mon hello world
int main()
{
printf("Hello world");
return 0;
}
@ogrrd
ogrrd / dnsmasq OS X.md
Last active May 3, 2024 08:33
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

#!/usr/bin/python2.7
#
# Dahua backdoor Generation 2 and 3
# Author: bashis <mcw noemail eu> March 2017
#
# Credentials: No credentials needed (Anonymous)
#Jacked from git history
#
import string