This gist is updated daily via cron job and lists stats for npm packages:
- Top 1,000 most depended-upon packages
- Top 1,000 packages with largest number of dependencies
- Top 1,000 packages with highest PageRank score
| #!/usr/bin/env bash | |
| sudo apt update | |
| sudo apt -y install curl | |
| # Set up PHP 8.0 | |
| sudo apt update | |
| sudo apt -y install software-properties-common | |
| sudo add-apt-repository ppa:ondrej/php | |
| sudo apt update |
| --- | |
| - hosts: localhost | |
| vars: | |
| - dnsname: your.dns.name | |
| - tmppath: "./tmp/" | |
| - crtpath: "{{ tmppath }}{{ dnsname }}.crt" | |
| - pempath: "{{ tmppath }}{{ dnsname }}.pem" | |
| - csrpath: "{{ tmppath }}{{ dnsname }}.csr" | |
| - pfxpath: "{{ tmppath }}{{ dnsname }}.pfx" | |
| - private_key_password: "password" |
| ## Meant to be scheudled on a cron/timer of 90 days (CIS Benchmark) | |
| ## The target keys need permissions to rotate themselves | |
| import boto3 | |
| from botocore.exceptions import ClientError | |
| import os | |
| from datetime import datetime | |
| import shutil | |
| from ConfigParser import SafeConfigParser |
| -- Create a group | |
| CREATE ROLE readaccess; | |
| -- Grant access to existing tables | |
| GRANT USAGE ON SCHEMA public TO readaccess; | |
| GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
| -- Grant access to future tables | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
| #!/bin/bash | |
| # Bash shell script for generating self-signed certs. Run this in a folder, as it | |
| # generates a few files. Large portions of this script were taken from the | |
| # following artcile: | |
| # | |
| # http://usrportage.de/archives/919-Batch-generating-SSL-certificates.html | |
| # | |
| # Additional alterations by: Brad Landers | |
| # Date: 2012-01-27 |
| #!/usr/bin/env python3 | |
| import collections | |
| import datetime | |
| import pprint | |
| import click | |
| import jinja2 | |
| import requests |
| # Before Script | |
| before_script: | |
| - composer self-update | |
| - composer install --prefer-dist > /dev/null | |
| - cp .env.example .env | |
| - php artisan key:generate | |
| - php artisan migrate:refresh | |
| # Services | |
| services: |
| #!/bin/bash | |
| # Simple script to copy a MySQL to another | |
| # Parent backup directory | |
| backup_parent_dir="/path/to/tmp/backup/dir" #notice no ending slash | |
| # MySQL settings | |
| mysql_user="elevateduser" | |
| mysql_password="elevateduserpassword" |
In response to some people claiming that using a CSPRNG is "going way overboard" and/or is "overkill", I've written this test to verify the performance impact of using a CSPRNG versus their insecure mt_rand() based hacks.
I think the results are conclusive (at least on my device): A 50% speed increase. In addition to less-predictable randomness.
If anyone would like to suggest a benchmark script (or conditions that lead to different results with mine), let me know and I will link to them here.