Skip to content

Instantly share code, notes, and snippets.

View wesley974's full-sized avatar
💭
Learning CEH...

Wesley wesley974

💭
Learning CEH...
View GitHub Profile
@aks
aks / thor-template.rb
Created February 23, 2018 22:03
A template for a new ruby thor-based command-line utility
#!/usr/bin/env ruby
#
# THOR template
$PROG = File.basename($PROGRAM_NAME)
$DIR = File.dirname($PROGRAM_NAME)
# Possibly modify the LOAD_PATH
# $LOAD_PATH << File.join(__dir__, '..', 'lib/migrations')
**** RHCSA NOTE ****
==== Basic access
ssh-keygen
ssh-copy-id <servername>
==== Diagnostic Information
sosreport
# basic pfctl control
# ==
# Related: http://www.OpenBSD.org
# Last update: Tue Dec 28, 2004
# ==
# Note:
# this document is only provided as a basic overview
# for some common pfctl commands and is by no means
# a replacement for the pfctl and pf manual pages.
@josh-cain
josh-cain / RhcePrep.md
Last active April 5, 2021 15:29
Quick Review sheet for EX300

RHCSA Review Sheet

1 -> 16) Review of EX200 Concepts

17) Managing IPv6 Networking

  • When specifying IPv6 Address w/ port, use this format: [2001:db8:0:10::1]:80
  • /64 is standard IPv6 subnet mask (but providers generally use /48)
  • Important IPv6 Addresses:
  • ::1/128 => localhost (equivalent to 127.0.0.1/8)
@xjdrew
xjdrew / squid_https.md
Last active June 5, 2025 07:05
配置squid https代理

编译

通过ubuntuapt-get安装的squid没有启用ssl功能,需要手动编译。

编译squid步骤如下。

安装依赖及获取源代码

apt-get install openssl libssl-dev ssl-cert
apt-get source squid
@VegarLH
VegarLH / Mastodon_on_OpenBSD.doc
Last active August 23, 2018 21:00
#DigitalOcean #Openbsd #Mastodon #Notes
Notes from my mastodon test instance config.
Assumptions: you own some domain-name and its pointing to the ip of this instance. I'm calling it my.domain
This may or may not work for you. I've moved notes around so things might break.
I'm basically just doing config as described here:
https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Production-guide.md
# Start: I'm creating the machine on DigitalOcean.
# You can probably skip this part ( 9.)
### DigitalOcean guest creation ###
1.#create digitalocean host. 10$ (non-zfs freebsd host) i did this on a 5$ but upgraded later.
@iscott
iscott / simple_authentication_rails_5_bcrypt_and_has_secure_password.md
Last active August 14, 2025 00:56
Cheat Sheet: Simple Authentication in Rails 5 with has_secure_password

Cheat Sheet: Simple Authentication in Rails 6 with has_secure_password

The goal of this cheatsheet is to make it easy to add hand-rolled authentication to any rails app in a series of layers.

First the simplest/core layers, then optional layers depending on which features/functionality you want.

Specs
AUTHOR Ira Herman
LANGUAGE/STACK Ruby on Rails Version 4, 5, or 6

Ruby Association Certified Ruby Examination Silver Sample Questions

Q1. Which of the following have true values in Ruby? (Choose two.)

  • (a) ""
  • (b) 0
  • (c) false
  • (d) nil

@josh-cain
josh-cain / RhcsaPrep.md
Last active April 5, 2021 15:30
Quick Review sheet for EX200

RHCSA Review Sheet

====================

1) Local & Remote Logins

  • SSH
    • ssh-keygen => create public + private key pair
    • ssh-copy-id => easy way to copy key to correct location in remote system
    • ssh-agent => prevents you from having to re-enter a password protected key multiple times
    • ssh-add => adds private key identities to the authentication agent
#!/bin/sh
url='http://pgl.yoyo.org/as/serverlist.php?hostformat=nohtml'
ftp -o - "$url" | awk '{printf "local-zone: \"%s.\" static\n", $1}' > /var/unbound/etc/blacklist.conf.new || exit $?
mv /var/unbound/etc/blacklist.conf.new /var/unbound/etc/blacklist.conf
rcctl reload unbound