Skip to content

Instantly share code, notes, and snippets.

View popcorn245's full-sized avatar
👻

Bobby ^_^ popcorn245

👻
View GitHub Profile
@popcorn245
popcorn245 / MadnessApp.sublime-project
Created August 13, 2015 02:33
My standard Sublime Project File
{
"folders":
[
{
"follow_symlinks": true,
"path": ".",
"folder_exclude_patterns": [
"node_modules",
".git",
"engine",
@popcorn245
popcorn245 / Default (Windows).sublime-keymap
Created August 30, 2015 06:25
Sublime Keyboard Shortcuts
[
{ "keys": ["ctrl+shift+b"], "command": "exec", "args": {"kill": true} },
{ "keys" : ["ctrl+shift+alt+b"], "command" : "show_panel" , "args" : {"panel": "output.exec"} }
]
@popcorn245
popcorn245 / FormatTel.ts
Last active March 3, 2017 05:48
Phone Number Formatter TypeScript
/// <reference path="../tsd/angularjs/angular.d.ts"/>
module AppName {
class TelFilter {
constructor(tel) {
if (!tel) { return ''; }
var value = tel.toString().trim().replace(/^\+/, '');
if (value.match(/[^0-9]/)) {
@popcorn245
popcorn245 / Rest.js
Created November 5, 2015 16:04
My awesome rest services with promises written in plain old JS.
angular.module('AppName').service('Rest', function($http, $q, $httpParamSerializer){
this.get(rUrl, rParams) {
if (!rParams) {
rParams = false;
} else {
rParams = this.$httpParamSerializer(rParams);
}
var deferred = this.$q.defer();
this.$http.get(rUrl, rParams, {
headers: {
@popcorn245
popcorn245 / hue_colors.md
Last active December 10, 2023 03:10
XY Color Conversion

FROM HUE DESIGN DOCS

https://github.com/PhilipsHue/PhilipsHueSDK-iOS-OSX/blob/00187a3db88dedd640f5ddfa8a474458dff4e1db/ApplicationDesignNotes/RGB%20to%20xy%20Color%20conversion.md

#Conversion between RGB and xy in the CIE 1931 colorspace for hue The conversion between RGB and xy in the CIE 1931 colorspace is not something Philips invented, but we have an optimized conversion for our different light types, like hue bulbs and LivingColors. It is important to differentiate between the various light types, because they do not all support the same color gamut. For example, the hue bulbs are very good at showing nice whites, while the LivingColors are generally a bit better at colors, like green and cyan.

@popcorn245
popcorn245 / CellProviders.json
Created April 8, 2016 18:11
An array of cell providers with name and domain for text messaging via e-mail.
[
{ 'name': '3 River Wireless', 'domain': 'sms.3rivers.net' },
{ 'name': 'ACS Wireless', 'domain': 'paging.acswireless.com' },
{ 'name': 'Alltel', 'domain': 'message.alltel.com' },
{ 'name': 'AT&T', 'domain': 'txt.att.net' },
{ 'name': 'Blue Sky Frog', 'domain': 'blueskyfrog.com' },
{ 'name': 'Bluegrass Cellular', 'domain': 'sms.bluecell.com' },
{ 'name': 'Boost Mobile', 'domain': 'myboostmobile.com' },
{ 'name': 'BPL Mobile', 'domain': 'bplmobile.com' },
{ 'name': 'Carolina West Wireless', 'domain': 'cwwsms.com' },
@popcorn245
popcorn245 / dabblet.css
Last active February 16, 2017 04:43
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
@popcorn245
popcorn245 / import.tsx
Created September 25, 2017 18:39
Stencil with Import
import { Component, Prop } from '@stencil/core';
import Ajax from 'ajax-promise-es6';
@Component({
tag: 'ft-irma',
styleUrl: 'ft-irma.scss'
})
export class FtIrma {
render() {
@popcorn245
popcorn245 / app-home.tsx
Created January 10, 2018 18:59
Baking with StencilJS
import { Component } from '@stencil/core';
@Component({
tag: 'app-home',
styleUrl: 'app-home.scss'
})
export class AppHome {
render() {
ion-page {
top: 0;
right: 0;
bottom: 0;
left: 0;
position: absolute;
z-index: 0;
display: flex;