Skip to content

Instantly share code, notes, and snippets.

@ArnonHongklay
ArnonHongklay / migrate.js
Created November 24, 2017 22:55 — forked from ultimagriever/migrate.js
Migrate Mongo -> Firebase
/**
* Migrate MongoDB database to Firebase.
* Syntax: node migrate.js [-c || --collection=]<MongoDB Collection> [ [-h || --host=]<MongoDB URI>]
* If no args are provided, the MONGODB_URI
* env variable declared in the .env file
* will be used instead.
*/
const env = require('dotenv');
const firebase = require('firebase');
#!/usr/bin/python
from impacket import smb
from struct import pack
import os
import sys
import socket
'''
EternalBlue exploit by sleepya
The exploit might FAIL and CRASH a target system (depended on what is overwritten)
@ArnonHongklay
ArnonHongklay / readme.md
Created November 3, 2016 10:23 — forked from flbuddymooreiv/readme.md
erlang + rebar + cowboy Hello World

This is the process of setting up erlang, rebar3, and cowboy for a Hello World, starting with a clean Debian 8 install.

Update apt and install deps:

root@046edcaea45a:~# apt-get update
root@046edcaea45a:~# apt-get install erlang erlang-dev gcc
root@046edcaea45a:~# wget https://s3.amazonaws.com/rebar3/rebar3
root@046edcaea45a:~# mkdir ~/bin/
root@046edcaea45a:~# mv rebar3 ~/bin/
root@046edcaea45a:~# chmod +x ~/bin/rebar3 
import binascii
flag = ''
with open('hodor.txt') as f:
for line in f:
if 'ho' in line:
line = line.strip().replace('ho', '0').replace('dor', '1').split(' / ')
for l in line:
flag += binascii.unhexlify('%x' % int(l, 2))
print flag
@ArnonHongklay
ArnonHongklay / gist:a2af5178d7585401c754052dfa632e18
Created August 17, 2016 21:41 — forked from sstern6/gist:11f4e3ff92e0bc4052b1
How To | Implement Intercom with React JS 0.14
Disclaimer : I was using Webpack with React/Flux, this is just an implementation that I got to work. Many other ways you could do this.
-Reference Intercom for more information on implementation: https://docs.intercom.io/install-on-your-web-product/integrating-intercom-in-one-page-app
Step 1) create 2 files in your apps root, chat.js and intercom.js.
Step 2) In chat.js paste in the JS library file given to you in the docs, but replace {app_id} with your actually app_id:
(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;
s.src='https://widget.intercom.io/widget/{app_id}';
var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,fa
@ArnonHongklay
ArnonHongklay / install-comodo-ssl-cert-for-nginx.rst
Created August 13, 2016 07:16 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

➜ devslopes-showcase-dev (master) ✗ brew install Caskroom/cask/google-cloud-sdk
==> brew cask install Caskroom/cask/google-cloud-sdk
==> Caveats
google-cloud-sdk is installed at /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk. Add your profile:
for bash users
source '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc'
source '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc'
for zsh users
Welcome to Cloud Shell! For help, visit https://cloud.google.com/cloud-shell/help.
arnon@daydash-1346:~$ gcloud config set project daydash-1346 \
> && gcloud source repos clone default \
> ~/src/daydash-1346/ruby_mvms_quickstart \
> && cd ~/src/daydash-1346/ruby_mvms_quickstart/1-hello-world \
> && git checkout master
Cloning into '/home/arnon/src/daydash-1346/ruby_mvms_quickstart'...
Receiving objects: 100% (1462/1462), 341.99 KiB | 87.00 KiB/s, done.
Resolving deltas: 100% (684/684), done.
Checking connectivity... done.
@ArnonHongklay
ArnonHongklay / 0_reuse_code.js
Created June 10, 2016 09:42
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You could use browserify-rails (1.5.0) gem or bower-rails gem or Rails Assets to pull in third party plugins or components (depending on where they are available).
With browserify you will have to use Common JS standard to write modular components. With others you can just use global objects, like: window.jQuery
If you decide to use browserify, just follow the gem installation instructions and setup your app like so:
Using browserify
Application.js Setup