Skip to content

Instantly share code, notes, and snippets.

View DevEarley's full-sized avatar
🎯
Focusing

Alex Earley DevEarley

🎯
Focusing
View GitHub Profile
@DevEarley
DevEarley / some-directive.js
Created March 8, 2018 02:15
Just some directive, doesn't do much.
angular
.module("someApp", [])
.directive("someDirective", function () {
return {
scope:{
someStringLiteral:"@",
someTwoWayBinding:"=",
someFunction:"&"
},
controllerAs:"vm",
@kaiware007
kaiware007 / billboard.shader
Created January 19, 2018 09:28
Simple Billboard shader for Unity
Shader "Unlit/Billboard"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "DisableBatching" = "True" }
@ygrenzinger
ygrenzinger / CleanArchitecture.md
Last active April 28, 2025 15:23
Summary of Clean Architecture by Robert C. Martin

Summary of book "Clean Architecture" by Robert C. Martin

Uncle Bob, the well known author of Clean Code, is coming back to us with a new book called Clean Architecture which wants to take a larger view on how to create software.

Even if Clean Code is one of the major book around OOP and code design (mainly by presenting the SOLID principles), I was not totally impressed by the book.

Clean Architecture leaves me with the same feeling, even if it's pushing the development world to do better, has some good stories and present robust principles to build software.

The book is build around 34 chapters organised in chapters.

@DevEarley
DevEarley / some-factory.js
Last active March 8, 2018 02:18
vm.Something = new Something();
angular.module('SomeApp').factory('SomeFactory',
function ($rootScope) {
var Something = function () {
this.Stuff = [];
this.AlertStuffLength = function () {
alert("This much Stuff: " + this.Stuff.length);
}
this.AddStuff = function (_stuff) {
this.Stuff.push(_stuff);
}
@DevEarley
DevEarley / some_index.html
Created August 6, 2017 20:14
your typical index.html
<html>
<head>
<link rel="stylesheet" type="text/css" href="some-website.min.css">
</head>
<body ng-app="SomeWebsite">
<ng-view></ng-view>
<script src="some-website.min.js" type="text/javascript" ></script>
</body>
</html>
@DevEarley
DevEarley / some-service.js
Created June 18, 2017 02:51
Your Everyday service.
'use strict';
angular.module('myApp').service('UserService', ['$http', '$window', function ($http, $window) {
return {
getUsers: function () {
return $http({
method: 'GET',
url: $http.defaults.apiUrl + '/users',
headers: { 'Authorization': $window.sessionStorage.token }
}).then(function (data) { return data.data; });
@DevEarley
DevEarley / some-app.js
Last active October 3, 2018 17:02
Your everyday app.js - with routing
angular.module('myApp', ['ngRoute']).config(function ($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: 'content/views/login/login.html',
controller: 'loginController',
controllerAs: 'vm'
})
.when('/home', {
templateUrl: 'content/views/landing/landing.html',
controller: 'landingController',
@DevEarley
DevEarley / some-controller.js
Created June 18, 2017 02:44
Your everyday angular controller.
'use strict';
var myApp = angular.module('myApp');
myApp.controller('SomeController', ['$scope', '$rootScope', '$location',
function ($scope, $rootScope, $location) {
}]);
//OR
@haukurk
haukurk / Dockerfile
Last active November 8, 2018 17:58
.NET Core NancyFx with IdentityServer4
FROM microsoft/dotnet:1.1.1-sdk
COPY ./NancyAPI.csproj /app/
WORKDIR /app/
RUN dotnet restore
ADD ./ /app/
RUN dotnet publish -c Debug
EXPOSE 5000
@cbscribe
cbscribe / 8_way_input.gd
Last active April 8, 2018 20:21
gdscript - quick input vector (8 way)
var vect = Vector2()
vect.x = Input.is_action_pressed("right") - Input.is_action_pressed("left")
vect.y = Input.is_action_pressed("down") - Input.is_action_pressed("up")
vect = vect.normalized()