Skip to content

Instantly share code, notes, and snippets.

@sgoblin
sgoblin / rhubarbot.py
Created December 22, 2016 21:00
JimTheBot from rhubarb.sgoblin.com
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
import websocket
from time import sleep
import json
# Insert database name here
db_name="jimdb"
# Insert valid database URI here
@sgoblin
sgoblin / index.html
Created July 3, 2015 19:38
Noscript subdomain vulnerability
<!DOCTYPE html>
<html>
<head>
<title>This is bad</title>
</head>
<body>
<script src="https://doc-04-5g-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/kosihan82lv9arfjiis0esj2peohuj3k/1435946400000/14741156124002909380/*/0B8TlbUgV6wt3N0JLVHR0QzJSRG8?e=download" type="text/javascript"></script>
</body>
</html>
@sgoblin
sgoblin / whogoes.py
Last active August 29, 2015 14:21
Halt! Who goes there?
#!/usr/bin/env python3
def haltWhoGoes():
whogoes = input("Halt! Who goes there? ")
print("You may pass, "+whogoes+".")
if __name__ == "__main__":
haltWhoGoes()
@sgoblin
sgoblin / 2.5.2RubiniusLog.txt
Created February 14, 2015 18:21
Log from failed install of rubinius 2.5.2
/tmp/ruby-build.20150213212239.19770 ~
HTTP/1.1 200 OK
Content-Type: binary/octet-stream
Content-Length: 11709271
Connection: keep-alive
Date: Thu, 12 Feb 2015 05:54:19 GMT
Last-Modified: Fri, 30 Jan 2015 19:20:07 GMT
ETag: "e5973d6e0a16f0390dc2a7478db83ff5"
Accept-Ranges: bytes
Server: AmazonS3
@sgoblin
sgoblin / scopeNamespace.py
Created January 29, 2015 03:56
An experiment with namespaces. Will help the new programmer with understanding variable scope and namespaces.
"""This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@sgoblin
sgoblin / servoandmotorandknob1.ino
Last active December 17, 2015 18:39
Servo and Motor controlled by a knob
// Copyright sgoblin
// Released under the GNU LGPL v3 http://www.gnu.org/licenses/lgpl.html
// Many thanks to Arduino for creating this great open hardware,
// Sparkfun for selling it with some examples and a manual,
// and the authors of the arduino examples for writing amazing examples.
//This imports the servo library; adding some code that was prewritten to make servos easier to use
#include <Servo.h>
//This assigns the number 10 to the constant integer variable motorPin
@sgoblin
sgoblin / knob.ino
Created May 24, 2013 14:32
Knob Arduino Example
// Controlling a servo position using a potentiometer (variable resistor)
// by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>
#include <Servo.h>
Servo myservo; // create servo object to control a servo
int potpin = 0; // analog pin used to connect the potentiometer
int val; // variable to read the value from the analog pin