Skip to content

Instantly share code, notes, and snippets.

View ryanseys's full-sized avatar
🌴

Ryan Seys ryanseys

🌴
View GitHub Profile
@ryanseys
ryanseys / LAB3C.asm
Last active August 29, 2015 14:16
Lab 3C
NAME LAB3B
;*****************************************************************************
; B E G I N N I N G O F P R O G R A M
;*****************************************************************************
;-----------------------------------------------------------------------------
; E Q U A T E S
;-----------------------------------------------------------------------------
NAME LAB3B
;*****************************************************************************
; B E G I N N I N G O F P R O G R A M
;*****************************************************************************
;-----------------------------------------------------------------------------
; E Q U A T E S
;-----------------------------------------------------------------------------
NAME LAB3A
;*****************************************************************************
; B E G I N N I N G O F P R O G R A M
;*****************************************************************************
;-----------------------------------------------------------------------------
; E Q U A T E S
;-----------------------------------------------------------------------------

Keybase proof

I hereby claim:

  • I am ryanseys on github.
  • I am ryanseys (https://keybase.io/ryanseys) on keybase.
  • I have a public key whose fingerprint is 67C5 6072 AC55 ACC3 FF90 FE02 E6E9 472D B65E 12D2

To claim this, I am signing this object:

var vq = function () {
var heart = ' '+
'\n _____ _____ '+
'\n ,ad8PPPP88b, ,d88PPPP8ba, '+
'\n d8P" "Y8b, ,d8P" "Y8b '+
'\n dP´ "8a8" `Yd '+
'\n 8( " )8 '+
'\n I8 8I '+
'\n Yb, BE MY ,dP '+
@ryanseys
ryanseys / ellipse-simulation.js
Created February 10, 2015 04:31
Ellipse Simulation
function Ellipse(width, height, cx, cy) {
this.height = height;
this.width = width;
this.x = cx;
this.y = cy;
}
Ellipse.prototype.contains = function(x, y) {
var term1 = Math.pow(x - this.x, 2)/Math.pow(this.width/2, 2);
var term2 = Math.pow(y - this.y, 2)/Math.pow(this.height/2, 2);
@ryanseys
ryanseys / compute-design-doc.md
Last active August 29, 2015 14:13
Google Compute Engine + gcloud-node Design Doc

Compute Engine + gcloud-node Design Doc

var gcloud = require('gcloud');

Heirarchy

Global level

<?php
// file_put_contents("file1.txt", "this is a message", FILE_APPEND | LOCK_EX);
$fp = fopen("file1.txt", "w+");
/* open the file */
if (flock($fp, LOCK_EX | LOCK_NB)) {
fwrite($fp, "another message");
sleep(3); // sleep for 3 seconds
flock($fp, LOCK_UN); // unlock
@ryanseys
ryanseys / database.php
Last active August 29, 2015 14:11
database.php
<?php
$db = new mysqli("localhost", "root", "password", "courses");
$sql = "INSERT INTO prerequisites VALUES('elec2501', 'phys1004', 'math1005', '')";
$db->query($sql);
echo "done";
$sql2 = "SELECT * FROM prerequisites";
$rows = $db->query($sql2);
while($row = $rows->fetch_object()) {
"use strict";
var util = require("util"),
_ = require("underscore"),
events = require("events"),
request = require("request"),
AppAuthClient = require("../google/AppAuthClient"); //thin wrapper around the google oauth2client - simply initializing it with app's client id and secret
var SimpleAuthTransporter= (function () {