Skip to content

Instantly share code, notes, and snippets.

# Allow Generic Lets-Encrypt store
location ^~ /.well-known/acme-challenge/ {
root /srv/apps/www/acme-challenge/;
try_files $uri =404;
}
#!/usr/bin/env ruby
# encoding: utf-8
begin
require 'rainbow'
rescue LoadError
puts "Rainbow is not installed"
puts " gem install rainbow"
exit
end

Quick Links

Traditional Column Change

Sequel.migration do
  change do
    alter_table(:table_name) do
      add_column :name, String, :null => true
 do
@marshallmick007
marshallmick007 / index.html
Created October 11, 2017 14:04
Duck Duck Go Firefox Search
<!DOCTYPE>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>start.duckduckgo.com</title>
<link rel="search"
type="application/opensearchdescription+xml"
title="Start DDG"
href="start.duckduckgo.com.xml">
su - postgres
createdb {databasename}
psql {databasename}
databasename=# CREATE USER tester WITH PASSWORD 'test_password';
databasename=# GRANT ALL PRIVILEGES ON DATABASE "databasename" to tester;
databasename=# \q
@marshallmick007
marshallmick007 / pwned.rb
Created February 21, 2018 22:48 — forked from schmich/pwned-interactive.rb
Check if a password has been pwned with the Pwned Passwords V2 API
require 'io/console'
require 'open-uri'
require 'digest'
puts "The 5-character prefix of the password's SHA-1 hash will be sent."
puts "For details, see https://www.troyhunt.com/ive-just-launched-pwned-passwords-version-2/"
print 'Password (hidden): '
password = $stdin.noecho(&:gets).strip
puts
wget https://wordpress.org/latest.zip
unzip latest.zip
mv wordpress www

chown www-data:www-data  -R www
cd www
# Change directory permissions rwxr-xr-x
find . -type d -exec chmod 755 {} \;  
# Change file permissions rw-r--r--
@marshallmick007
marshallmick007 / reclaimWindows10.ps1
Created June 1, 2021 14:19 — 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 ...