Skip to content

Instantly share code, notes, and snippets.

View unisys12's full-sized avatar

Phillip Jackson unisys12

View GitHub Profile
@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 / 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 / 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
},
{
@mixin keyframes( $animationName )
{
@-webkit-keyframes $animationName {
@content;
}
@-moz-keyframes $animationName {
@content;
}
@-o-keyframes $animationName {
@content;
@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.
@unisys12
unisys12 / build_phalcon
Created January 25, 2014 19:23
Bash script to download and install PhalconPHP in a DIY Openshfit Cartridge.
#!/bin/bash
phalcon=${OPENSHIFT_REPO_DIR}/cphalcon
function download_phalcon() {
#mkdir -p ${OPENSHIFT_REPO_DIR}
cd ${OPENSHIFT_REPO_DIR}
pushd ${OPENSHIFT_REPO_DIR}
@unisys12
unisys12 / SessionController.php
Created February 11, 2014 18:51
Phalcon Authentication Issue [Note] This was actually an issue with me having my column length, in my users table, too short. Instead of 60 chars max, I had it at 50 chars max. DOH![/NOTE]
<?php
class SessionController extends \Phalcon\Mvc\Controller
{
public function indexAction()
{
// Will display users profile... once logged in
}
@unisys12
unisys12 / svg_colorizer_hsl.scss
Created March 1, 2014 18:24
SVG Filler Mixin with Hover Effect. Very simple, but handy if you are using SVG's for icons and want a uniform scheme to each. Decided to go with RGBA after all, but will work on this later.
@mixin svg_colorize($hue, $saturation, $lightness) {
fill: hsl($hue, $saturation, $lightness - 20);
&:hover {
fill: hsl($hue, $saturation, $lightness);
}
}
@unisys12
unisys12 / svg_colorizer_rgba.scss
Created March 1, 2014 20:28
##SVG_Colorizer RGBA This version is the same as before, but supports RGBA... of course.
@mixin svg_colorize($red, $green, $blue, $alpha) {
fill: rgba($red, $green, $blue, $alpha);
&:hover {
fill: rgba($red, $green, $blue, $alpha - .2);
}
}
/*****************
* Useage Example*
****************/
@unisys12
unisys12 / UserController.php
Last active August 29, 2015 14:01
My Phalcon UserController ...Just because I don't want to loose it
<?php
class UsersController extends ControllerBase{
public function IndexAction()
{
//Displays Classic Style Form at domain.dev/users