Skip to content

Instantly share code, notes, and snippets.

@0x8BADFOOD
0x8BADFOOD / start_stop_greylog
Created November 8, 2018 16:33
greylog start stop status
#
Stop:
service graylog-server stop; service elasticsearch stop; service mongodb stop;
# Check Status:
service graylog-server status; service elasticsearch status; service mongodb status;
# Start
service graylog-server start; service elasticsearch start; service mongodb start;
#Uninstalling node
curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
#Installing node
brew install node
brew link node
brew link --overwrite node
sudo npm install npm@latest -g
@0x8BADFOOD
0x8BADFOOD / pandora_login.py
Last active January 4, 2018 17:23
partnerLogin for Pandora sample
#!/usr/local/bin/python2.7
import json
import urllib2
username = "android"
password = "AC7IBG09A3DTSYM4R41UJWL07VLN8JI7"
deviceModel = "android-generic"
url = "https://tuner.pandora.com:443/services/json/?method=auth.partnerLogin"
@0x8BADFOOD
0x8BADFOOD / gist:e5cdc0895d9d8191f5352bde5c92c808
Created October 10, 2017 17:08
Download and Install NDK for Mac
wget https://dl.google.com/android/repository/android-ndk-r15c-darwin-x86_64.zip
unzip android-ndk-r15c-darwin-x86_64.zip
cd android-ndk-r15c
mkdir ARM-FOR-NDK
./android-ndk-r15c/build/tools/make_standalone_toolchain.py --arch arm64 --install-dir ./ARM-FOR-NDK
@0x8BADFOOD
0x8BADFOOD / allTheDMGs.py
Created September 27, 2017 14:24 — forked from arubdesu/allTheDMGs.py
generate all the things
#!/usr/bin/python
# -*- coding: utf-8 -*-
import glob
import os
import subprocess
import sys
sys.path.append('/usr/local/munki/munkilib')
import FoundationPlist
path = '/Users/abanks/Library/AutoPkg/Cache'
@0x8BADFOOD
0x8BADFOOD / gist:db5770a88c3927c0c0faa95096aee107
Created June 9, 2017 23:55
rename fils on mac in terminal
brew install renmae
rename 's/^/MyVacation2011_/g' *.png
rename 's/hdpi/pin/g' *hdpi*
/Users/username/Library/Mail/V3/B233BAE5-173D-4707-97D8-8F1B3C4F8937/Inbox.mbox/24FDEF0E-3F0E-49F1-B4B9-4C507B8FC086/Data/1/Messages
@0x8BADFOOD
0x8BADFOOD / -
Created April 27, 2016 22:14
Markdown to PDF
pandoc interview_quesitons.md --latex-engine=xelatex -o interview_quesitons.pdf
@0x8BADFOOD
0x8BADFOOD / long_lines.vim
Created April 2, 2016 04:04 — forked from fgarcia/long_lines.vim
Highlight long lines (>80) and provide a toggle command
" Highlight long lines (>80)
autocmd BufEnter * highlight OverLength ctermbg=darkgrey guibg=#592929
autocmd BufEnter * match OverLength /\%81v.*/
autocmd BufEnter * let w:long_line_match = 1
fu! LongLineHighlightToggle()
highlight OverLength ctermbg=darkgrey guibg=#592929
if exists('w:long_line_match')
match OverLength //
@0x8BADFOOD
0x8BADFOOD / create_ssh_keys.md
Created November 20, 2015 02:34
count followers on github from command line