Skip to content

Instantly share code, notes, and snippets.

View nhalstead's full-sized avatar
👨‍💻
Something. Maybe cool

Noah Halstead nhalstead

👨‍💻
Something. Maybe cool
View GitHub Profile
@BBcan177
BBcan177 / MS-4
Created January 1, 2018 20:52
pfBlockerNG: webtransparency.cs.princeton.edu - The following is the list of sites from Alexa top 1 million which embed scripts that extract email addresses from the browsers' built-in login (password) managers.
# https://webtransparency.cs.princeton.edu/no_boundaries/autofill_sites.html
# The following is the list of sites from Alexa top 1 million which embed scripts that extract email addresses from the browsers'
# built-in login (password) managers.
1000sunny.net
1001trucscoolsafaire.fr
123boutchou.com
12zawodnik.pl
1pic1day.com
2012un-nouveau-paradigme.com
247nigerianewsupdate.co
@calumroy
calumroy / win10_AutoStart.md
Last active September 26, 2024 19:33
Windows 10 automatically login and start a program.

Auto start a user program and hide windows 10 home from a user.

The goal is to setup a windows 10 home computer that automatically starts up and runs a user .exe program. No windows logos should be shown and the user should not be able to interact with other windows applications.

Upon shutdown of the .exe the computer should shutdown.

Regedit

Windows 10 home or pro doesn't allow you to directly set a classic windows app such as a user .exe program as the startup. We instead call a batch script that calls our .exe. instead.

A windows batch script is used to make a .exe run on startup.

<!-- Twitter -->
<a href="https://twitter.com/intent/tweet?text=<?php echo rawurlencode($user_wish['title']); ?>%20💯%20Sending%20you%20a%20Happy%20New%20Year%20Greetings%20🎁%20👉%20<?php echo $current_page; ?>" target="_blank">Twitter</a>
@devjj
devjj / freenas-backblazeb2.md
Last active April 6, 2023 06:29
FreeNAS Backup to Backblaze B2

Backing up FreeNAS to Backblaze B2

I am not the original author of the content on this page. While searching for information about setting up Backblaze B2 on a FreeNAS installation, I came across this hyperlink: https://blog.justin-tech.com/blog/freenas-b2-backup. Unfortunately, that page now leads to an HTTP 502. Google had it cached.

*The instructions worked almost perfectly, except for a couple adjustments due to updated versions of the relevant software. The idea that this useful information may disappear into the aether worried me, as it may still help others, and I'll more than likely need it again in the future. In the spirit of open source, I copied the page as rich text in Firefox, ran it through an HTML to Markdown converter, and set about cleaning it up, fixing conversion errors and fo

@chris-jamieson
chris-jamieson / snippet.js
Created November 26, 2017 13:44
Sequelize snippet for sorting (REST api)
// snippet to help feed sort parameters into Sequelize query
// following Vinay Sahni's best practices (http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api)
// e.g. https://my-url.com/api/v1/sausages?sort=-createdAt,name
function list (req, res, next) {
const findOptions = {
order: [],
};
// handle sorting / ordering
if (req.query.sort) {
@soulmachine
soulmachine / jwt-expiration.md
Last active June 19, 2025 15:38
How to deal with JWT expiration?

First of all, please note that token expiration and revoking are two different things.

  1. Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
  2. Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.

1. How to hadle JWT expiration

A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.

Quoted from JWT RFC:

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.example.com;
root /var/www/ghost/system/nginx-root;
return 301 https://example.com$request_uri;
ssl_certificate /etc/letsencrypt/www.example.com/fullchain.cer;
ssl_certificate_key /etc/letsencrypt/www.example.com/www.example.com.key;
@karlhillx
karlhillx / macos_high_sierra_apache_php_brew_2018.md
Last active January 4, 2025 05:36
macOS High Sierra Setup: Homebrew + Apache + PHP + MariaDB + SSL

macOS High Sierra Setup: Homebrew + Apache + PHP + MariaDB + SSL

Homebrew Installation

First let's install Homebrew.

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

@jeffochoa
jeffochoa / Response.php
Last active October 6, 2025 22:11
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@mbmohib
mbmohib / PHP.txt
Created October 27, 2017 16:16
PHP
PHP - MARIA DB - LARAVEL - ATOM
# PHP + Maria DB:
$ sudo apt-add-repository ppa:ondrej/php
$ sudo apt-get install curl unzip phpunit mariadb-client mariadb-server sqlite3 php7.0 php7.0-cli php7.0-curl php7.0-mcrypt php7.0-sqlite3 php7.0-mbstring php7.0-zip php7.0-mysql php7.0-xml
$ which php
$ which mysql
# Composer + Laravel
Get the Composer first : https://getcomposer.org/download/