Skip to content

Instantly share code, notes, and snippets.

View wildone's full-sized avatar
🎯
Focusing

Max Barrass wildone

🎯
Focusing
View GitHub Profile
@wildone
wildone / squid.conf
Last active June 3, 2020 02:34
Basic SQUID proxy config for running Squid in Docker with Local and Docker LAN allowed
# Description:
# Basic SQUID proxy config for running Squid in Docker with Local and Docker LAN allowed
#
# Uage:
# docker run --name squid -d --restart=always --publish 3128:3128 --volume ${pwd}\squid.conf:/etc/squid/squid.conf sameersbn/squid
#
# TAG: acl
# Defining an Access List
acl SSL_ports port 443
@wildone
wildone / convert-docx-to-md-with-images
Last active May 11, 2020 12:33
If you have a DOCX with images and would like to convert it to MD to publish somewhere run this command in the folder with your document. This will mount the folder into docker container, convert document and extract all images into subfolder.
docker run -v ${pwd}:/data pandoc/core -o test2.md --extract-media=./test2/ test2.docx
@wildone
wildone / text-strings-to-anchor
Last active April 30, 2020 04:44
Convert Strings into Anchor tags using Regex and Javascript
"If you are looking to fix strings that look like urls in text and convert them to ulrs like this https://www.example.ru http://www.example.com www.example.com.au example.co.jp http://blog.example.app http://www.example.com/product http://www.example.com/products?id=1&page=2 http://www.example.com#up http://255.255.255.255 255.255.255.255 http:// www.site.com:8008 you can use Regex in javascript to replace strings with a format of you liking even if a url is at the end of your string like google.com".replace(/((\w+:\/\/\S+)|(\w+[\.:]\w+\S+))[^\s,\.]/mg,'<a href="$&" target="_blank">$&</a>')
@wildone
wildone / PiHole Extra Block List
Last active March 20, 2020 01:06
Here is a list of things that https://github.com/cshawaus gave me :D, I've added a few things to it, just add this to blocklist in PiHole.
https://gist.githubusercontent.com/anudeepND/adac7982307fec6ee23605e281a57f1a/raw/5b8582b906a9497624c3f3187a49ebc23a9cf2fb/Test.txt
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://hosts-file.net/ad_servers.txt
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adaway.org/list.txt
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adblock-nocoin-list/list.txt

Keybase proof

I hereby claim:

  • I am wildone on github.
  • I am maxbarrass (https://keybase.io/maxbarrass) on keybase.
  • I have a public key ASAxoYdiRTDAhfH75sFZNU80hJLVWrMrDkqzCcXGxIhImQo

To claim this, I am signing this object:

@wildone
wildone / solr-filter.conf
Created August 13, 2018 19:27 — forked from sebnmuller/solr-filter.conf
Logstash config for ingesting Solr logs
input {
file {
path => "/Users/sebastienmuller/comperio/projects/sintef/tmp/logs/indexing_logs_2/solr.log.3"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
# Extract event severity and timestamp
@wildone
wildone / fix_virtualenv
Created January 18, 2018 02:44 — forked from ttimasdf/fix_virtualenv
Fix python virtualenv after python update, forked version for choice of python executable
#!/usr/bin/env bash
ENV_PATH="$(dirname "$(dirname "$(which pip)")")"
SYSTEM_VIRTUALENV="$(which -a virtualenv|tail -1)"
echo "Ensure the root of current virtualenv:"
echo " $ENV_PATH"
read -p "‼️ Say no if you are not sure (y/N) " -n 1 -r
echo
PYEXC_DEF="$(sed -n '1s/^#!//p' $SYSTEM_VIRTUALENV)"
read -p "🐍 Choose which python to use? [$PYEXC_DEF] " PYEXC
@wildone
wildone / designer.html
Last active July 19, 2016 11:06
designer
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
# Git credentials
GIT_AUTHOR_NAME="Max Barrass"
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
git config --global user.name "$GIT_AUTHOR_NAME"
GIT_AUTHOR_EMAIL="max.barrass@gmail.com"
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
git config --global user.email "$GIT_AUTHOR_EMAIL"
# Pip should only run if there is a virtualenv currently activated
export PIP_REQUIRE_VIRTUALENV=true
@wildone
wildone / convoy
Created January 24, 2016 13:52 — forked from colebrumley/convoy
Convoy init.d script
#!/bin/sh
set -e
### BEGIN INIT INFO
# Provides: convoy
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Should-Start: cgroupfs-mount cgroup-lite
# Should-Stop: cgroupfs-mount cgroup-lite
# Default-Start: 2 3 4 5