test()
foo bar baz
""" | |
This gist allows you to automatically register all models in a given app | |
for use in the Django Admin application. | |
Change (your-app-name) to your application name. | |
""" | |
import inspect | |
from django.contrib.admin.sites import AlreadyRegistered | |
from (your-app-name) import models |
# This number should be, at maximum, the number of CPU cores on your system. | |
# (since nginx doesn't benefit from more than one worker per CPU.) | |
worker_processes 24; | |
# Number of file descriptors used for Nginx. This is set in the OS with 'ulimit -n 200000' | |
# or using /etc/security/limits.conf | |
worker_rlimit_nofile 200000; | |
# only log critical errors | |
error_log /var/log/nginx/error.log crit |
Ingredients : | |
1/2 stick of butter | |
6-8 cloves of garlic sliced thinly | |
1 1/2 bottle of Franks | |
1/2 to 3/4 bag (5;b) of frozen or fresh wing parts | |
Procedure : | |
Add 3/4 of Franks, 1/4 stick of butter and garlic in skillet and simmer on low for 10 minutes. | |
Add wings and flip them to coat thoroughly. Cover and simmer on low for appx. 20 minutes (for frozen). | |
After 10 minutes, preheat your girll on high. | |
After 20 minutes, transfer wings from skillet into big bowl and bring to grill. |
#!/usr/bin/perl -w | |
use strict; | |
use warnings; | |
use feature (qw/state/); | |
sub encode { | |
state %hashMap; | |
if (not %hashMap) { | |
%hashMap = (); |
test()
foo bar baz
using System; | |
using System.Linq; | |
using NuGet; | |
namespace NuGetListNamespace | |
{ | |
class NuGetList | |
{ | |
static void Main(string[] args) | |
{ |
<!-- | |
Source: | |
https://blogs.microsoft.com/microsoftsecure/2017/09/07/new-iis-functionality-to-help-identify-weak-tls-usage/ | |
--> | |
<site name="Default Web Site" id="1" serverAutoStart="true"> | |
<application path="/"> | |
<virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot" /> | |
</application> | |
<bindings> |
#!/bin/bash | |
# Takes a list of URLs (output from ishttps) and turns them into a massive sed replacement script. | |
FILENAME="$1" | |
echo "sed -i '" | |
while read -r url; do | |
ESC_IN=$(echo "$url" | sed -e 's/[]\/$*.^[]/\\&/g') | |
ESC_OUT=$(echo "$ESC_IN" | sed -e 's/http:/https:/') | |
#!/usr/bin/python | |
# License: MIT | |
# Author: Michael Scovetta <[email protected]> | |
import re | |
import sys | |
""" | |
Usage: |
# Download JSON files for CVEs from https://nvd.nist.gov/vuln/data-feeds | |
# Extract JSON | |
# Fire up WSL or a Linux terminal. Make sure you have jq installed. | |
# Run this, send to a CSV file and then open/sort/whatever in Excel. | |
cat nvdcve-1.1-2021.json | jq '.CVE_Items[].cve | .CVE_data_meta.ID + ", " + .problemtype.problemtype_data[].description[].value' | cut -d\" -f2 |