Skip to content

Instantly share code, notes, and snippets.

View unisys12's full-sized avatar

Phillip Jackson unisys12

View GitHub Profile
@unisys12
unisys12 / sortCharacter.js
Created March 13, 2017 12:26
Sorting Characters Based on Date Last Played
// Edited character summary object returned from Bungie API
var characters = [
{
"characterBase": {
"membershipId": "4611686018431328330",
"membershipType": 1,
"characterId": "2305843009319995052",
"dateLastPlayed": "2017-03-13T01:18:03Z",
"minutesPlayedThisSession": "57",
"minutesPlayedTotal": "19702",
@unisys12
unisys12 / console_output.bash
Created July 17, 2016 16:03
Nodejs POST Request Error
# bot.js not included here. starts to whole process. Just shows process has started.
Logging from bot.js
# Data sample grabbed from line 23 of logs.js
{"_id":"204255289342427136","server":"FFC_Test_Server","channel":"general","author":"Unisys1
2","author_id":"154928746636378112","message":"test message to MongoDB Server using Mongoose
","mentions":[],"timestamp":1468768655859}
# Line 52 of logs.js
Writing the data to the request
@unisys12
unisys12 / Preferences.Sublime-Settings
Created July 27, 2014 14:08
Sublime Text User Settings
{
"color_scheme": "Packages/Color Scheme - Default/Monokai Bright.tmTheme",
"font_size": 10,
"spell_check": true,
"caret_style": "phase",
"line_padding_top": 2,
"line_padding_bottom": 2,
"bold_folder_labels": true,
"trim_trailing_white_space_on_save": true,
"remember_open_files": false,
@unisys12
unisys12 / gist:4084e1042c780f48cab7
Created July 17, 2014 16:43
PHP.INI for PHPNG installation
max_execution_time=600
memory_limit=128M
error_reporting=0
display_errors=0
log_errors=0
user_ini.filename=
realpath_cache_size=2M
cgi.check_shebang_line=0
zend_extension=opcache.so
@unisys12
unisys12 / gist:6b57fcb318317d0716ca
Created July 14, 2014 01:54
AssHat Config for TravisCI
<?php
$config = [
'css' => [
'build_path' => __DIR__ . '/../build/css',
'public_path' => __DIR__ . '/css/',
],
'js' => [
'build_path' => __DIR__ . '/../build/js',
@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
@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 / 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 / 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 / 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}