Skip to content

Instantly share code, notes, and snippets.

View joncutrer's full-sized avatar

JC joncutrer

View GitHub Profile
# AdAway default blocklist
# Blocking mobile ad providers and some analytics providers
#
# Project home page:
# https://github.com/AdAway/adaway.github.io/
#
# Fetch the latest version of this file:
# https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt
#
# License:
#!/bin/bash
# Install WordPress CLI
# Must be run as root for permission to write to /usr/local/bin
#
dl_url=https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
tmp_dir=$(mktemp -d -t wpcli-XXXXXXXXXX)
curl -o $tmp_dir/wp-cli.phar $dl_url
chmod +x $tmp_dir/wp-cli.phar
mv $tmp_dir/wp-cli.phar /usr/local/bin/wp
rm -rf $tmp_dir
@ismailyenigul
ismailyenigul / nginx-traefik-v2-docker-compose.yml
Last active May 4, 2024 22:59
nginx and traefik v2 deployment with docker-compose
1. create a network with docker network create NETWORKNAME
2. Create letsencrypt directory for acme.json ie /docker/letsencrypt directory or somewhere else mkdir -p /docker/letsencrypt
3. I configured http -> https redirect
# cat docker-compose.yml
version: '3.3'
services:
traefik2:
image: traefik
@gjerokrsteski
gjerokrsteski / remove env file from git forever
Last active May 3, 2024 19:42
remove env file from git history forever
echo '.env' >> .gitignore
git rm -r --cached .env
git add .gitignore
git commit -m 'untracking .env'
git push origin master
@multiplex3r
multiplex3r / loadPcap.py
Last active August 21, 2023 23:36
Load a PCAP into neo4j with scapy
#!/usr/bin/env python3
from scapy.all import *
from py2neo import Graph, Node, Relationship
packets = rdpcap("<your_pcap_file>")
g = Graph(password="<your_neo4j_password>")
for packet in packets.sessions():
pkt = packet.split()
import os
import signal
import subprocess
import sys
# Parse command-line arguments.
if len(sys.argv) > 1:
folder = os.path.abspath(sys.argv[1])
else:
folder = os.path.abspath(os.getcwd())
@glennswest
glennswest / wineventlog.go
Created February 16, 2019 05:24
Event Log Capture in Windows using GoLang
package main
import(
"fmt"
"syscall"
"unsafe"
"log"
"golang.org/x/sys/windows"
)
@alexellis
alexellis / RPI_UBUNTU.md
Last active January 18, 2019 03:28
Ubuntu 18.04 for RPi3 (64-bit)
  • Download via http://cdimage.ubuntu.com/releases/18.04/beta/
  • wget http://cdimage.ubuntu.com/releases/18.04/beta/ubuntu-18.04-beta-preinstalled-server-arm64+raspi3.img.xz
  • Run unxz ubuntu-18.04-beta-preinstalled-server-arm64+raspi3.img.xz
  • Identify flash drive with lsblk
  • Flash with Etcher / dd
2255+1 records in
2255+1 records out
2364544000 bytes (2.4 GB, 2.2 GiB) copied, 111.076 s, 21.3 MB/s
@ap0llo
ap0llo / Export-Slide.ps1
Created January 11, 2017 20:25
# Powershell script to export Powerpoint slides as jpg images using the Powerpoint COM API
# Powershell script to export Powerpoint slides as jpg images using the Powerpoint COM API
function Export-Slide($inputFile, $slideNumber, $outputFile)
{
# Load Powerpoint Interop Assembly
[Reflection.Assembly]::LoadWithPartialname("Microsoft.Office.Interop.Powerpoint") > $null
[Reflection.Assembly]::LoadWithPartialname("Office") > $null
$msoFalse = [Microsoft.Office.Core.MsoTristate]::msoFalse
$msoTrue = [Microsoft.Office.Core.MsoTristate]::msoTrue
@obonyojimmy
obonyojimmy / keyboardcapture.go
Last active February 21, 2024 10:13
go lang keyboard capture
package main
import (
"fmt"
"syscall"
//~ "time"
"unsafe"
"golang.org/x/sys/windows"
)