Skip to content

Instantly share code, notes, and snippets.

View excenter's full-sized avatar

Andrew Batz excenter

View GitHub Profile
@excenter
excenter / clearText.py
Created June 19, 2020 22:52
sometimes you need to delete a lot of flacs by extension, and xargs didn't feel right.
import os
def filterExtensions(file):
# change this extension to whatever you need expunged from the directory
filter = ".flac"
if file.endswith(filter):
return True
else:
return False
@excenter
excenter / notes.md
Created March 6, 2020 17:43
partial Bsides NOVA 2020 CTF

Level 01 25 login to the linux trainer:

trainer.threatsims.com 167.71.187.239

username: level0 password: level0

The password will be the login to level1

@excenter
excenter / extract_audio.json
Last active August 27, 2019 05:57
Velvet Labs Beta Documentation
{
"api_key": "ASDF",
"phone": "‪(804) 404-3070‬",
"first_name":"ima",
"audioTrim":{
"start":"00",
"stop":"45"
},
"audio_overwrite": true,
"audio": "https://youtu.be/7ysFgElQtjI"
@excenter
excenter / .bash_profile
Last active August 21, 2019 17:12
Hot andrew dev environment on macos
export PS1="CMP_NAME @\w >_ "
alias rmf='rm -rf'
alias ls='ls -F'
alias apache='sudo apachectl'
alias svim='sudo vim'
#mvn nonsense on terminal startup
@excenter
excenter / KillWebroot.bash
Last active August 7, 2021 18:56
All the nonsense you have to run to actually get rid of webroot.
sudo launchctl unload /Library/LaunchDaemons/com.webroot.security.mac.plist;
sudo kextunload /System/Library/Extensions/SecureAnywhere.kext;
sudo rm /usr/local/bin/WSDaemon;
sudo rm /usr/local/bin/WFDaemon;
sudo killall -9 WSDaemon;
sudo killall -9 WfDaemon;
sudo killall -9 "Webroot SecureAnywhere";
sudo rm -rf /System/Library/Extensions/SecureAnywhere.kext;
sudo rm -rf "/Applications/Webroot SecureAnywhere.app";
sudo rm /Library/LaunchAgents/com.webroot.WRMacApp.plist;
from pyogg import VorbisFile
from pygame import mixer
# path to your audio
path = "./file.ogg"
# an object representing the audio, see https://github.com/Zuzu-Typ/PyOgg
sound = VorbisFile(path)
# pull the frequency out of the Vorbis abstraction
frequency = sound.frequency
# initialize the mixer
@excenter
excenter / grab_complete_node.py
Created March 18, 2019 03:35
py2neo cheat sheet
from py2neo import Graph, Node, Relationship
graph = Graph(
host="alpha.graph.domain.co",
auth=('neo4j', 'thePassword-butBetter')
)
url="https://py2neo.org/v4/database.html#py2neo.database.Graph.delete_all"
a = Node("Type", url=url)
graph.merge(a, "Website", "url")
@excenter
excenter / squish.js
Created January 17, 2019 21:22
it's like minify, but different in subtle ways important to few people.
function jsonSquish(contents){
// remove all line breaks
// console.log(contents)
contents = contents.replace(/\r?\n|\r/g,"")
contents = contents.replace(/"/g, '\"\"')
// console.log(contents)
// compress all multiple spaces down to one space
change = ""
for(;change !== contents;){
// console.log(contents)
@excenter
excenter / time.js
Created January 15, 2019 16:19
get the current local time in your clipboard
copy(new Date().toLocaleString());
@excenter
excenter / youtube-dl-init.bash
Created January 2, 2019 20:52
bish lasagna
youtube-dl "https://www.youtube.com/watch?v=Mr__WcIjGs4" --write-auto-sub -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' --merge-output-format mp4