Skip to content

Instantly share code, notes, and snippets.

View mcmoe's full-sized avatar

Morgan Kobeissi mcmoe

View GitHub Profile
@mcmoe
mcmoe / pipeline-common.css
Created June 5, 2015 17:12
Delivery Pipeline common css
div.hide {
visibility: hidden;
}
div.pipeline-loading-icon {
content: url("white-load.gif");
display: block;
margin-left: auto;
margin-right: auto
}
@mcmoe
mcmoe / gradle-compile-local-project-dependency.markdown
Created August 25, 2017 08:39
How to link to a local Gradle dependency and compile it from source

add this to your settings.gradle

include ':my-other-project'
project(':my-other-project').projectDir = new File(settingsDir, '../my-other-project')

then you can link to it in your build.gradle like so

@mcmoe
mcmoe / OpenSSL cheat sheet for socket programmers.md
Created June 3, 2018 16:34 — forked from azadkuh/OpenSSL cheat sheet for socket programmers.md
OpenSSL cheat sheet. This is a brief howto for socket programmers.

#OpenSSL cheat sheet This is a brief howto for socket programmers.

create RSA key pairs

ex: 1024bits length key pair:

$> openssl genrsa -out myprivate.pem 1024
$> openssl rsa -in myprivate.pem -pubout -out mypublic.pem
@mcmoe
mcmoe / echarts4-linear-gradient-color.js
Created October 18, 2018 14:11
How to create a Linear Gradient color in echarts 4
// ...
const color = this._colors[i % this._colors.length];
const colorNext = echarts.color.lift(color, 0.3);
return {
type: 'linear',
x: 0,
y: 1,
x2: 0,
y2: 0,
@mcmoe
mcmoe / download-svg-from-web.js
Last active October 23, 2018 13:11
A quick way to download an SVG from a webpage
var e = document.createElement('script');
e.setAttribute('src', 'https://nytimes.github.io/svg-crowbar/svg-crowbar.js');
e.setAttribute('class', 'svg-crowbar');
document.body.appendChild(e);
/* Source: https://graphicdesign.stackexchange.com/questions/55123/how-do-i-save-an-svg-thats-on-a-website-to-my-computer */
@mcmoe
mcmoe / ntp-update-linux.md
Last active November 27, 2018 13:04
Update OS time based on specific NTP server
sudo /etc/init.d/ntp stop
sudo ntpdate -s server.company.com
@mcmoe
mcmoe / stream-processing-etl.md
Last active November 30, 2018 17:39
Stream processing ETL
@mcmoe
mcmoe / swn-ox.md
Last active March 20, 2019 17:30
SWN

kali distribution

  • aircrack-ng
  • airmon-ng
  • airodump-ng
  • iwconfig
  • ifconfig
  • macchanger
  • dhclient
  • netdiscover
  • tail -f /var/log/messages
@mcmoe
mcmoe / aws-pyspark-jupyter.sh
Created August 26, 2019 22:50
How to set up pyspark and jupyter on aws ec2 instance
# Originally based on https://raw.githubusercontent.com/pzfreo/ox-clo/master/code/flintrock-jupyter.sh
sudo yum install gcc gcc-c++ -y
# sudo yum install python27-pip -y
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
#sudo pip-2.7 install jupyter
sudo pip2.7 install jupyter
export PYSPARK_DRIVER_PYTHON=jupyter
export PYSPARK_DRIVER_PYTHON_OPTS='notebook --no-browser'