Skip to content

Instantly share code, notes, and snippets.

View lawrencegripper's full-sized avatar

Lawrence Gripper lawrencegripper

View GitHub Profile
@OrionReed
OrionReed / dom3d.js
Last active April 15, 2024 23:40
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@danielporto
danielporto / harbor.sh
Last active November 15, 2021 05:24 — forked from kacole2/harbor.sh
Quick Start Harbor Installation Script on Ubuntu 18.04
#!/bin/bash
#Harbor on Ubuntu 18.04
#Prompt for the user to ask if the install should use the IP Address or Fully Qualified Domain Name of the Harbor Server
PS3='Would you like to install Harbor based on IP or FQDN? '
select option in IP FQDN
do
case $option in
IP)
@damoodamoo
damoodamoo / Makefile-local-debug
Created January 14, 2020 14:53
Makefile for local webhook debugging
copy-running-certs:
kubectl get secret webhook-server-cert -n psc-system -o json | sed 's/ca.crt/cacrt/; s/tls.crt/tlscrt/; s/tls.key/tlskey/' > secrets.json
mkdir -p ./.running-keys
jq -r .data.cacrt < secrets.json | base64 --decode > ./.running-keys/ca.crt
jq -r .data.tlscrt < secrets.json | base64 --decode > ./.running-keys/tls.crt
jq -r .data.tlskey < secrets.json | base64 --decode > ./.running-keys/tls.key
mkdir -p /tmp/k8s-webhook-server/serving-certs
cp ./.running-keys/* /tmp/k8s-webhook-server/serving-certs/
rm secrets.json
@kacole2
kacole2 / harbor.sh
Last active February 21, 2024 02:33
Quick Start Harbor Installation Script on Ubuntu 18.04
#!/bin/bash
#Harbor on Ubuntu 18.04
#Prompt for the user to ask if the install should use the IP Address or Fully Qualified Domain Name of the Harbor Server
PS3='Would you like to install Harbor based on IP or FQDN? '
select option in IP FQDN
do
case $option in
IP)
@modulexcite
modulexcite / github_gpg_key.md
Created September 30, 2019 18:49 — forked from ankurk91/github_gpg_key.md
Github : Signing commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@baijum
baijum / dynamic_crds.go
Created June 25, 2019 11:49 — forked from tallclair/dynamic_crds.go
Example of using CRDs with the dynamic go client
package main
import (
"fmt"
"log"
"os/user"
"path/filepath"
"strings"
apixv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
@daybreaker
daybreaker / reactions.rb
Last active May 11, 2022 12:41
Ruby script to check slack reaction counts
require 'slack-ruby-client' # first, make sure you do: gem install slack-ruby-client
require 'date'
# Add your Slack API token here
token = [YOUR TOKEN HERE]
Slack.configure do |config|
config.token = token
end
@mackwage
mackwage / windows_hardening.cmd
Last active March 24, 2024 10:55
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
@F21
F21 / raft.go
Created November 15, 2017 05:05
Sample hashicorp/raft + hashicorp/serf app
package main
import (
"crypto/md5"
"flag"
"fmt"
"io"
"log"
"os"
"path/filepath"
@wheelcomplex
wheelcomplex / embedded-file-viewer.md
Created October 26, 2017 05:42 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links