Skip to content

Instantly share code, notes, and snippets.

View thomasgroch's full-sized avatar

Thomas Groch thomasgroch

View GitHub Profile
@thomasgroch
thomasgroch / README.md
Created March 21, 2019 04:54 — forked from ColCh/README.md
Create merge request on Gitlab in command line for current branch

Gitlab merge request script

Creates merge request on Gitlab for you

Installation

Download it, add executable perms and place into PATH:

# Place it into ~/.bin
mkdir ~/.bin
@thomasgroch
thomasgroch / turn_off_mac_SIP_system_security.md
Last active January 27, 2026 22:25
Disables some default root agents and daemon on MacOS (Version 3)

How to use

1. boot in recovery (command+r)

You can temporarily disable SIP by rebooting into Recovery Mode (press and hold Command-R from the time the computer starts until you see the Apple logo), then opening Terminal from the Utilities menu and entering this command:

csrutil disable

2. boot in normal:

#!/bin/bash
echo "Please wait..."
# Look for suspect files
/usr/bin/find -E /Applications -iregex '.*\.app\/(.*\.DS_Store|Icon.{1})$' > /tmp/.suspectfiles
# Check suspect files
appsCounter=0
while read path; do
@thomasgroch
thomasgroch / main.scpt
Created March 21, 2019 10:51
Hardened Chrome Browser
# Misc: --start-maximized --disable-save-password-bubble
# Reduce attack surface: --disable-presentation-api --disable-file-system --disable-contextual-search --disable-account-consistency --disable-translate --disable-background-mode --disable-plugins-discovery --disable-webgl --disable-webgl-image-chromium --disable-speech-api --disable-smart-virtual-keyboard --disable-print-preview --disable-password-generation --disable-overlay-scrollbar --disable-offer-upload-credit-cards --disable-ntp-popular-sites --disable-cloud-import --disable-component-cloud-policy --disable-credit-card-scan --disable-bundled-ppapi-flash --disable-java --disable-plugins --disable-ipv6 --disable-people-search --disable-default-apps
# Incognito, sandboxing & security stuff: --incognito --disable-sync --disable-sync-backup --disable-sync-rollback --disable-sync-app-list --disable-sync-types --enable-sandbox --enable-sandbox-logging --isolate-extensions --isolate-sites-for-testing=* --process-per-tab --process-per-site --safe-plugins
#
@thomasgroch
thomasgroch / gitlab_newrepo.sh
Created March 24, 2019 20:21 — forked from samuelchanx/gitlab_newrepo.sh
Create a repo on gitlab & set remote for current git directory
#!/bin/bash
echo "What's the name of the repository?"
read repoName
curl --header "PRIVATE-TOKEN: <YOUR PERSONAL PRIVATE TOKEN from Settings/Access Tokens>" -X POST "https://gitlab.com/api/v4/projects?name=$repoName"
echo "\n"
echo "Done. Do you want to add remote for current directory? (Y) / (N)"
read answer
#!/bin/bash
while sudo fuser /var/lib/apt/lists/lock >/dev/null 2>&1; do
echo "apt list database is locked by another process, waiting..."
sleep 10
done
while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do
echo "dpkg database is locked by another process, waiting..."
sleep 10
done
@thomasgroch
thomasgroch / ansible-hardening.sh
Created April 3, 2019 07:45 — forked from lukehinds/ansible-hardening.sh
Install ansible-hardening role. Construct inventory and playbook. Install Ansible Run Analysis and hooks.
#!/bin/bash
#set -x
if [[ `whoami` != "stack" ]]; then
echo -e "Please run this script as the stack user"
exit
fi
source ~/stackrc
@thomasgroch
thomasgroch / config.js
Created April 5, 2019 05:02 — forked from jackmahoney/config.js
Vuepress Markdown Variable substitution
// inside config.js extend webpack so that `__var_name__` is replaced with value of `config[var_name]`
// relies on npm install string-replace-loader
{
configureWebpack(config) {
config.resolve.alias["@"] = path.join(__dirname, "/theme");
config.resolve.alias["~"] = path.join(__dirname, "/public");
if (process.env.NODE_ENV === "production") {
const mappings = Object.keys(config).map(key => {
return { search: `__${key}__`, replace: config[key] }
})
@thomasgroch
thomasgroch / .eslintrc.js
Created April 5, 2019 05:36 — forked from sokolovstas/.eslintrc.js
VUE + ESlint + TypeScript + Prettier + ChromeDEV FIX
module.exports = {
root: true,
env: {
node: true
},
extends: ["plugin:vue/essential", "@vue/prettier", "@vue/typescript"],
rules: {
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
quotes: ["error", "single"],
@thomasgroch
thomasgroch / captive.txt
Created April 25, 2019 17:01 — forked from mortonfox/captive.md
[Captive Portal Test URLs] #wifi
Captive portal test
http://clients3.google.com/generate_204
http://172.217.6.238/generate_204
http://captive.apple.com/hotspot-detect.html
http://www.apple.com/library/test/success.html
http://attwifi.apple.com/library/test/success.html
http://www.msftncsi.com/ncsi.txt