This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clean Code: A handbook of agile software craftmanship | |
ISBN-13: 978-0132350884 | |
The Clean Coder: A code of conduct for professional programmers | |
ISBN-13: 978-0137081073 | |
Domain-Driven Design: Tackling complexity in the heart of software | |
ISBN-13: 978-0321125217 | |
Patterns of Enterprise Application Architecture |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpPost] | |
public Model Get(int id) | |
{ | |
var context = new TrineContext(); | |
var investments = context.Investments.Where(i => i.Project_Id == id); | |
var projects = context.Projects.ToArray().Where(p => p.Id == id); | |
Expression<Func<Investment, bool>> c = i => | |
i.Payment.State == PaymentState.Paid | |
|| i.Payment.State == PaymentState.PendingBankwire; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import json | |
import boto3 | |
import os | |
def lambda_handler(event, context): | |
instance_id = event.get("detail", {}).get("instance-id", "") | |
if instance_id == "": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ansible-playbook test.yml | |
PLAY [localhost] *************************************************************** | |
TASK [debug] ******************************************************************* | |
ok: [localhost] => { | |
"hosts": { | |
"correct": "{\"host\":\"127.0.0.1\"}", | |
"incorrect": { | |
"host": "127.0.0.1" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Announce etcd node | |
[Service] | |
ExecStart=/bin/date | |
Type=simple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -ne 3 ] | |
then | |
echo "Usage: s3-get iam-role-name s3-resource output-file" | |
exit 1 | |
fi | |
Role=$1 | |
Resource=$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
using BlackCore.GameWorld; | |
namespace BlackCore.GameWorld | |
{ | |
public interface IRoom | |
{ | |
IRoom SelectMode(Dictionary<string, int> mode, int state); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Solution | |
* |- Domain | |
* | `- Customers | |
* | |- Customer.cs | |
* | `- ICustomersRepository.cs | |
* |- Infrastructure | |
* | `- Customers | |
* | `- LinqToSqlCustomersRepository.cs | |
* `- Application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
static class TimeKeeper | |
{ | |
public static readonly Func<DateTime> DefaultTimeKeeper = () => DateTime.UtcNow; | |
private static readonly object LockObject = new object(); | |
private static Func<DateTime> CurrentTimeKeeper = DefaultTimeKeeper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
alias such = git | |
alias very = git | |
alias wow = 'git status' | |
# wow | |
# such commit | |
# very push |
NewerOlder