This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gunicorn.conf.py: getting gevent and psycogreen running | |
bind = '127.0.0.1:1437' | |
accesslog = "<some-path>/logs/gunicorn-access.log" | |
errorlog = "<some-path>/logs/gunicorn-error.log" | |
workers = 5 | |
try: | |
# fail 'successfully' if either of these modules aren't installed | |
from gevent import monkey | |
from psycogreen.gevent import patch_psycopg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function () { | |
if (window.location.host == 'music.youtube.com') { | |
Notification.requestPermission().then(function (permission) { | |
if (permission == 'granted') { | |
document.querySelector('#progress-bar.ytmusic-player-bar').addEventListener('value-change', function (event) { | |
if(event.srcElement.value == 1) { | |
new Notification(document.querySelector('.title.ytmusic-player-bar').textContent, { | |
icon: document.querySelector('img.ytmusic-player-bar').src, | |
body: document.querySelector('.subtitle.ytmusic-player-bar').textContent.trim().split('•')[0] | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install openssl | |
brew install swig | |
pip install --global-option=build_ext --global-option="-I/usr/local/opt/openssl/include" m2crypto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install jansson # OR apt-get install libjansson-dev for debian based linux distros | |
git clone https://github.com/VirusTotal/yara.git | |
cd yara/libyara/modules/ | |
curl -O https://raw.githubusercontent.com/Anlyz/androguard-yara/master/androguard.c | |
sed -i -e 's/MODULE(cuckoo)/MODULE(cuckoo)'$'\\\nMODULE(androguard)/g' module_list | |
cd .. | |
sed -i -e 's~MODULES += modules\/cuckoo.c~MODULES += modules\/cuckoo.c'$'\\\nMODULES += modules/androguard.c~g' Makefile.am | |
cd .. | |
./bootstrap.sh | |
./configure --enable-cuckoo --enable-dotnet --enable-magic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Do a regex search and return group(1) or None | |
import re | |
get_match = lambda regex, sample: getattr(re.search(regex, sample), 'group', lambda x: None)(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -e | |
mkdir -p $HOME/work | |
sudo apt-get update | |
echo "Installing pip" | |
sudo apt-get install python-pip | |
echo "Installing pip, python-dev, build-essential" | |
sudo apt-get install -y python-pip python-dev build-essential | |
echo "Installing pip, python-dev, build-essential" | |
sudo pip install virtualenv virtualenvwrapper | |
echo "Upgrading pip" |