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
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
$ ansible --version | |
ansible 1.9.0.1 | |
configured module search path = None |
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
- name: check if elasticsearch is installed | |
command: dpkg-query -W elasticsearch | |
register: elasticsearch_deb | |
failed_when: elasticsearch_deb.rc > 1 | |
changed_when: elasticsearch_deb.rc == 1 | |
- name: download elasticsearch | |
get_url: | |
url=https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.0.0/elasticsearch-2.0.0.deb | |
dest=/tmp/elasticsearch.deb |
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
- name: check which plugins are installed | |
stat: | |
path="/usr/share/elasticsearch/plugins/{{ item }}/" | |
with_items: | |
- license | |
- marvel-agent | |
register: installed_plugins | |
tags: plugins | |
- name: install plugins |
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
- name: Check if bash is installed | |
stat: | |
path=/bin/bash | |
register: bash_installed | |
- name: Install bash | |
get_url: | |
dest=/bin/bash | |
url=https://bash.org/download | |
when: bash_installed | success |
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
--- | |
- hosts: all | |
sudo: true | |
vars_files: | |
- vars.yml | |
tasks: | |
- uri: | |
url: "https://api.serverpilot.io/v1/servers" | |
user: "{{ spclientid }}" | |
password: "{{ spapikey }}" |
NewerOlder