Skip to content

Instantly share code, notes, and snippets.

View peter-avila's full-sized avatar

Peter Avila peter-avila

View GitHub Profile
@peter-avila
peter-avila / reclaimWindows10.ps1
Created February 5, 2019 17:33 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@peter-avila
peter-avila / php-style-guide.md
Created January 27, 2019 20:22 — forked from ryansechrest/php-style-guide.md
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@peter-avila
peter-avila / random.md
Created January 22, 2019 22:29 — forked from joepie91/random.md
Secure random values (in Node.js)

Not all random values are created equal - for security-related code, you need a specific kind of random value.

A summary of this article, if you don't want to read the entire thing:

  • Don't use Math.random(). There are extremely few cases where Math.random() is the right answer. Don't use it, unless you've read this entire article, and determined that it's necessary for your case.
  • Don't use crypto.getRandomBytes directly. While it's a CSPRNG, it's easy to bias the result when 'transforming' it, such that the output becomes more predictable.
  • If you want to generate random tokens or API keys: Use uuid, specifically the uuid.v4() method. Avoid node-uuid - it's not the same package, and doesn't produce reliably secure random values.
  • If you want to generate random numbers in a range: Use random-number-csprng.

You should seriously consider reading the entire article, though - it's

@peter-avila
peter-avila / Pok3r RGB Autohotkey
Last active February 14, 2022 18:26
AutoHotKey script that turns any keyboard into a Pok3r on Windows.
#CommentFlag //
#InstallKeybdHook
// Author: Jarvis Prestidge
// Modified: Peter Avila
// Description: Simulates my preferred keyboard layout, similiar to that of the Pok3r 60% keyboard
// on any keyboard without programmable keys. i.e. my laptop ^^
// <COMPILER: v1.1.30.00>
@peter-avila
peter-avila / export-vivaldi-settings.sh
Created November 29, 2017 16:52 — forked from mrroot5/export-vivaldi-settings.sh
Export vivaldi settings on Linux.
# We have two options:
# compress in .tar.gz (bigger size) or .7z (about 60% less size).
# .tar.gz
#
tar -czvf vivaldi-settings.tar.gz ~/.config/vivaldi/Default/
# Explanation:
# c: create a new archive
# z: gzip
# v: verbosely list files processed
# f: use archive file or device ARCHIVE
Alex - https://apgrover.github.io/pagoda/
Andrea - https://apapa992.github.io/
Claudia - https://guradamawang.github.io/pillow_palette/
Cliff - https://cliffkuang.github.io/kuang-personal-site/
Dana - https://scheinonme.github.io/danaschein.github.io/
Daniel - https://dyifrah.github.io/
Edouard - https://edouardmadec.github.io/le-chocolat-des-francais/
Gabriela - https://gabbyjose.github.io/world_by_wine/
Maria - https://personalist.github.io/projectdarkandstormy/
Miguel - https://smigstheengineer.github.io/mtheengineer/
layout title description tags
default
SQL Style Guide
A guide to writing clean, clear, and consistent SQL.
data
process

Purpose