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
server { | |
listen 7777; | |
location / { | |
root /tmp/www; | |
index index.html; | |
try_files $uri @lua; | |
} | |
location /api { |
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 | |
SRC=$(git rev-parse --show-toplevel)/src/client | |
#========================================================== | |
# Check if I forgot to remove 'only' keyword from tests. | |
# To make sure that before commit run all tests | |
only=`grep -c -h -r --include "*.spec.js" -E "(describe|it)\.only" $SRC/src | awk -F ':' '{x +=$0}; END {print x}'` | |
if (( $((only)) > 0 )) | |
then | |
echo 'Remove ONLY from tests.' |
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
{ | |
... | |
"scripts": { | |
"test": "mocha --recursive --require test_setup.js src/**/*.spec.js", | |
}, | |
"devDependencies": { | |
"babel": "5.6.14", | |
"babel-core": "5.6.20", | |
"babel-plugin-rewire": "0.1.5", | |
"chai": "3.0.0", |
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
// Type definitions for fixed-data-table 0.6.0 | |
// Project: https://github.com/facebook/fixed-data-table | |
/// <reference path="../react/react.d.ts"/> | |
declare module FixedDataTable { | |
export var version: string; | |
export interface TableProps extends __React.Props<Table> { | |
/** |
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
export class Counter extends React.Component<any, any> { | |
constructor(props) { | |
super(props); | |
this.state = {count: props.initialCount}; | |
} | |
tick = () => { | |
this.setState({count: this.state.count + 1}); | |
} | |
render() { | |
return ( |
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
import * as Immutable from 'immutable'; | |
const UserRecord = Immutable.Record({ | |
id: '', | |
age: 0 | |
}, 'User'); | |
class User extends UserRecord { | |
public readonly id: string; | |
public readonly age: number; |
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; | |
using System.IO; | |
using System.Net.Security; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Text; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.Extensions.Configuration; |
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
import {DiskService, SnapshotService} from "yandex-cloud/api/compute/v1"; | |
const FOLDER_ID = process.env.FOLDER_ID; | |
export async function handler(event, context) { | |
const snapshotService = new SnapshotService(); | |
const diskService = new DiskService(); | |
const diskList = await diskService.list({ | |
folderId: FOLDER_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
// Конфгурируем Yandex.Cloud provider | |
provider "yandex" { | |
zone = "ru-central1-a" | |
} | |
// Объявляем переменную с названием Организации на гитхабе. | |
// К сожалению github provider не создает ресурсы `github_actions_secret` в личных репах | |
// https://github.com/terraform-providers/terraform-provider-github/issues/422 | |
// К счастью базовая функциональность организаций теперь бесплатна. | |
variable "github_organization" { |
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: Gatsby Build and Publish | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest |
OlderNewer