Skip to content

Instantly share code, notes, and snippets.

View goncalor's full-sized avatar

Gonçalo Ribeiro goncalor

View GitHub Profile
@goncalor
goncalor / framabag-delete-all.js
Last active November 29, 2016 16:11
Delete all articles from Framabag.org
// execute when logged into your Framabag.org account (using Wallabag 1.9.1)
// https://stackoverflow.com/questions/247483/http-get-request-in-javascript#4033310
function httpGet(theUrl)
{
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false ); // false for synchronous request
xmlHttp.send( null );
return xmlHttp.responseText;
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#include <avr/io.h>
#include <util/delay.h>
#define BAUD 9600
#include <util/setbaud.h>
#define BLINK_DELAY_MS 1000
void initUSART(void) { /* requires BAUD */
UBRR0H = UBRRH_VALUE; /* defined in setbaud.h */
UBRR0L = UBRRL_VALUE;
FROM alpine:latest
RUN apk add python3
RUN pip3 install shodan
RUN adduser -h /home/shodan -D shodan
USER shodan
WORKDIR /home/shodan
#!/usr/bin/env sh
n=${1:-10}
grep /tcp /usr/share/nmap/nmap-services | sort -rk3 | cut -f2 | grep -Po '\d+' | head -n $n | tr '\n' ','
echo
FROM alpine:latest
RUN echo @testing http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
>> /etc/apk/repositories
RUN apk --no-cache add masscan@testing libpcap-dev
CMD ["/bin/sh"]
FROM alpine:latest
RUN apk add --no-cache openssh-server #openssh-sftp-server
RUN ssh-keygen -A
RUN adduser -h /home/user -D user
RUN pw=$(head -c 12 /dev/urandom | base64); echo "user:$pw" | chpasswd; echo $pw
EXPOSE 22
CMD /usr/sbin/sshd -D && sh

Keybase proof

I hereby claim:

  • I am goncalor on github.
  • I am goncalor (https://keybase.io/goncalor) on keybase.
  • I have a public key whose fingerprint is 5AAE 5B73 BC0E 1B38 0223 C652 57EF 4D95 A5EB 8140

To claim this, I am signing this object:

FROM debian:stable-slim
RUN apt update \
&& apt install -y chromium curl unzip \
&& rm -rf /var/lib/apt/lists/*
#RUN useradd -m -d /app user
WORKDIR /app
RUN curl -L -o file.zip \
# gen a new RSA key
ssh-keygen -t rsa -b 4096 -f /home/user/.ssh/whatever
# .ssh/config
Host host.local
PreferredAuthentications publickey
IdentityFile ~/.ssh/whatever