Skip to content

Instantly share code, notes, and snippets.

View unisys12's full-sized avatar

Phillip Jackson unisys12

View GitHub Profile
@unisys12
unisys12 / compassless-vertical-carousel.scss
Last active January 3, 2016 02:09
This is the SCSS used to run the vertical carousel on the landing page of raycocopiers.com. At this moment, it requires Compass. Hoping to rewrite it to be a lot more agnostic for future use.
@mixin keyframes( $animationName )
{
@-webkit-keyframes $animationName {
@content;
}
@-moz-keyframes $animationName {
@content;
}
@-o-keyframes $animationName {
@content;
@unisys12
unisys12 / plusActivities.js
Last active December 21, 2015 20:19
AngularJS resource that should pull activities from a users Google+ account using their ID
function plusCtrl($scope, $resource){
$scope.UserID = '<!-- User ID Here! -->';
$scope.Key = '<!-- GoogleAPI Access Key Here! -->';
$scope.Activity = $resource(
'https://www.googleapis.com/plus/v1/people/:id/activities/public?key=:key&callback=JSON_CALLBACK',
{
id: $scope.UserID, key: $scope.Key
},
{
@unisys12
unisys12 / plusProfile.js
Created August 27, 2013 03:14
Angular resource that is used to access Google Plus profile info...
function plusCtrl($scope, $resource){
$scope.plus = $resource('https://www.googleapis.com/plus/v1/people/<!--Google User ID Here-->',
{key: '<!--Your Google Access Key Here!-->', callback: 'JSON_CALLBACK'},
{get: {method: 'JSONP'}});
$scope.plusFeed = $scope.plus.get();
}
@unisys12
unisys12 / list.cs
Created August 17, 2013 21:06
Learning C# and working with arrays. Little exercise I did using a for loop to number a list of people.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Arrays
{
class List
{
@unisys12
unisys12 / timesheet_model.php
Last active December 17, 2015 18:19
This is a method from a model, in a codeigniter project that I did several months ago. Recently realized that I did not have any checks to see if the user had already submitted an entry for that particular day. This is what I came up with, but I just don't feel right about it. I mean, it works, just think that there should be a better, cleaner w…
class Timesheet_model extends CI_Model{
public function insert($name, $date, $wrkHrs, $vacHrs, $sickHrs, $holiday){
/** Check the date that the client is trying to insert for,
* see if it already exists. If so, return a error message.
* If not, then perform the insert statment.
*/
//Prepare the query
@unisys12
unisys12 / Users_Model.php
Last active December 17, 2015 13:29
Just playing around with some user authentication in Codeigniter - Work in progress!
class Users extends CI_Model {
public function __construct()
{
parent::__construct();
}
public function getUser($user)
{
@unisys12
unisys12 / circle.js
Created May 7, 2013 01:46
Function that draws a grid on your HTML5 Canvas. To use, just pass the function and a integer, which represents the spacing of the grid in pixels.
function circle(){
canvas = document.getElementById('canvas');
ctx = canvas.getContext('2d');
x = 115;
y = canvas.height / 2;
radius = 95;
counterClockwise = false;
@unisys12
unisys12 / products.js
Last active December 15, 2015 01:39
Products Data Object that I am building that will possibly be using for an up coming redesign of our company site.
var data = {
contact :'http://www.raycocopiers.com/salesquote.php',
products : {
bwprinters : {
MLP150 : {
model: 'MLP150',
img: 'img/printers_bw/MLP150DN.gif',
link: "products/bwprinters/mlp150.php",
desc: [
'Fast, 50 page per minute print speed',
@unisys12
unisys12 / index.html
Created March 12, 2013 23:30
Just some java script that I am playing around with while teaching myself the language. This is just an exercise in constructor objects and object literals and using them. Basically just a little character set-up type script sorta thing. I would like to turn this into something more, but I am just learning here, so... we will see. My gut tells m…
<!DOCTYPE html>
<html lang=en>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Adventure Time!</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/style.css">
</head>
<body>