Skip to content

Instantly share code, notes, and snippets.

@honkskillet
honkskillet / theme.css
Created May 8, 2020 04:36
css needed for chessground background and pieces to be viewable
//*
* Chessground base css properties.
*
* You need to include the css files in themes folder in order to have the
* board and pieces displayed!
*/
.cg-wrap {
width: 320px;
@honkskillet
honkskillet / serverless.env.yml
Created May 16, 2018 15:19
Serverless + AppSync + IAM/Cognito Auth + Lambda datasources (for mongoDB)
# Keep all sensitive data in this file and add it to your .gitignore
dev:
awsAccountId: 1111111111
mongoUrl: "url to dev monogDB"
region: us-east-1 #if not set will default to us-west-2
# prod:
# awsAccountId: 1111111111
# mongoUrl: "url to production monogDB "

###Simple Socket.io Setup

We will use npm to manage the node modules we need for this project.

In you project folder, from the terminal enter

npm init

and follow the prompts. This will create a package.json file in your project's root directory.

Here is my implimentation of an angular alert service (actually factory). It is composed of a factory definition and a directive.

alert.directive.js The directive.

angular.module('myApp')
  .directive('customAlerts', function (Alert) { //injects the Alert serivce
    return {
      scope: {
        alertType: '@?',
      },
//SCSS
//THIS FILE CONSOLIDATES ALL THE REDUNDANT COLOR VARIABLE DEFINITIONS IN THE OFFICIAL SASS BOOTSTRAP _variable.scss FILE
//to be used with package {name: bootstrap-sass, version: 3.1.1}, variable names might not match with other versions
//USAGE
//@import this file *before* you import bootstrap into your main scss file
//This file can be used as a starting point to further reduce the number of color variable
// (15 shade of gray is overkill, there is really no need for both #f9f9f9 and #f8f8f8 !!1!)
//== Overwrite Colors
//

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@honkskillet
honkskillet / byte-sizetuts.md
Last active August 22, 2024 14:19
A series of golang tutorials with youtube videos.