Skip to content

Instantly share code, notes, and snippets.

View jonathanwork's full-sized avatar

Jonathan Lopez jonathanwork

View GitHub Profile
@jonathanwork
jonathanwork / vuesolutions.js
Created December 27, 2017 21:27
vue js workaround for runtime compiling error
resolve: {
alias: {
vue: 'vue/dist/vue.js'
}
}
@jonathanwork
jonathanwork / dockerfile
Created December 18, 2017 00:20
docker getting swift to run on linux
//makes swift run properly on linux
docker run -it --security-opt seccomp=unconfined --name swiftfun swiftdocker/swift:latest /bin/bash
@jonathanwork
jonathanwork / docker_image_start_init.sh
Last active October 27, 2017 07:26
quick docker install
dnf install httpd nginx nodejs npm php mongodb mongodb-server net-tools nmap -y
@jonathanwork
jonathanwork / connection.txt
Created October 15, 2017 20:01
beaglebone linux connection hack
BeagleBone Black:
ifconfig usb0 192.168.7.2
route add default gw 192.168.7.1
Host PC:
sudo su
#eth0 is my internet facing interface, eth3 is the BeagleBone USB connection
@jonathanwork
jonathanwork / workaroundVuejsMaterialize.js
Created September 27, 2017 00:25
vuejs + materialize-css workaround with webpack
resolve: {
alias: {
'jquery': path.resolve(__dirname, 'node_modules/jquery/dist/jquery.js')
}
}
@jonathanwork
jonathanwork / workaroundElectron.html
Created September 6, 2017 03:42
work around for electron
<!-- Insert this line above script imports -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<!-- normal script imports etc -->
<!-- Insert this line after script imports -->
<script>if (window.module) module = window.module;</script>
@jonathanwork
jonathanwork / electronInstall.sh
Created September 5, 2017 21:10
how to install electron!
sudo npm install -g electron --unsafe-perm=true --allow-root
@jonathanwork
jonathanwork / penTools.sh
Created July 31, 2017 00:09
this is creates a bunch of pentools for fedora
#!/bin/bash
#credits to https://github.com/madmantm/fedora-pentest-tools thanks :D
echo "[*]preliminary questions regarding user-rights"
clear
read -p "[*]Please enter your username, this will help me fix permissions:" myname
clear
echo "[*]what would be your prefered directory name for the tools? no slashes pls"
@jonathanwork
jonathanwork / propsToFiles.js
Last active July 18, 2017 07:38
file turns object props names to files....
//author: Jonathan R. Lopez
function propsToFile (obj, prop, dirpath, ext) {
for(let props in obj[prop]) {
fs.writeFile(`${dirpath}${obj[prop][props].split(' ').join('_')}${ext}` , `<%# ${obj[prop][props].split(' ').join('_')} %>`, err=> {
err ? console.log(err) : console.log('file written')
});
}
};
@jonathanwork
jonathanwork / clearRAM.sh
Created July 15, 2017 10:52 — forked from pklaus/clearRAM.sh
A Script to Clear Cached RAM on Linux
#!/bin/bash
## Bash Script to clear cached memory on (Ubuntu/Debian) Linux
## By Philipp Klaus
## see <http://blog.philippklaus.de/2011/02/clear-cached-memory-on-ubuntu/>
if [ "$(whoami)" != "root" ]
then
echo "You have to run this script as Superuser!"
exit 1
fi