Skip to content

Instantly share code, notes, and snippets.

View samsmo's full-sized avatar

Sam Smolenski samsmo

  • Spotify
  • New York, NY
View GitHub Profile
@samsmo
samsmo / A-Pen-by-Sam-.markdown
Created February 19, 2014 16:38
A Pen by Sam .
<?php
require_once('mobile_device_detect.php');
mobile_device_detect(true,true,true,true,true,true,true,'http://mynysfair.com/mobile',false);
if (!isset($_SESSION)) {
session_start();
}
$logininfo .='';
if (!(isset($_SESSION['MM_Username']))){
$logininfo .='<td>
<h2>Login</h2><br /><a href="login.php">Click here to login</a>
@samsmo
samsmo / innermonster.cpp
Last active October 2, 2015 23:28
openNI/ofxAssimp joint-follow demo
#include "testApp.h"
//--------------------------------------------------------------
void testApp::setup() {
ofSetLogLevel(OF_LOG_NOTICE);
if(model.loadModel("triangle.dae",true)){
model.setScale(.25,.25,.25);
model.setPosition(ofGetWidth()/4, ofGetHeight()/4 , 0);
@samsmo
samsmo / project1.html
Created April 9, 2012 19:05
A Quiz made in Vanilla JavaScript
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled</title>
<meta name="generator" content="BBEdit 9.5" />
<script type="text/javascript" src="myData.js"></script>
<script type="text/javascript" src="cookies.js"></script>
<link rel="stylesheet" href="style.css" />
<script type="text/javascript">
@samsmo
samsmo / Bat.as
Last active October 2, 2015 23:28
Bat class for Imaginary Monsters prototype
package com
{
import flash.display.InteractiveObject;
import flash.geom.Point;
import org.flixel.*;
public class Bat extends Enemy
{
@samsmo
samsmo / usersController.rb
Created April 9, 2012 18:58
UsersController from dj app
class UsersController < ApplicationController
before_filter :signed_in_user, only: [:edit, :update]
before_filter :correct_user, only: [:edit, :update]
def new
@user = User.new
end
def show
@user = User.find(params[:id])
<!doctype html>
<html lang="en">
<head>
<title>three.js tech demo created by sam smo!</title>
<meta charset="utf-8">
<style>
body {
background:#000;
padding:0;
margin:0;
@samsmo
samsmo / musicCreator.mm
Created March 5, 2012 03:56
This class gets pixel data that fills arrays that a synth will use to play music for us!
#include "musicCreator.h"
musicCreator::musicCreator(string myPic){
//some bools
startMusic = false;
changePage = false;
//store pic name for the font var later
myPicName = myPic;
//load up the images (bg, button and our actual musician(image)!
myImg.loadImage(ofxiPhoneGetDocumentsDirectory()+myPic);
@samsmo
samsmo / Document.as
Created February 10, 2012 22:27
Tap-A-Story Document Class
package Code {
import flash.display.*;
import flash.display.Sprite;
import flash.events.*;
import flash.ui.Multitouch;
import flash.ui.MultitouchInputMode;
import flash.sensors.Accelerometer;
import flash.utils.*;
public class Document extends MovieClip {